33
44from kirin .ir .nodes .stmt import Statement
55
6- from .abc import Trait
6+ from .abc import StmtTrait
77
88if TYPE_CHECKING :
99 from kirin .ir import Statement
1010
1111
1212@dataclass (frozen = True )
13- class Pure (Trait [ "Statement" ] ):
13+ class Pure (StmtTrait ):
1414 """A trait that indicates that a statement is pure, i.e., it has no side
1515 effects.
1616 """
@@ -19,7 +19,7 @@ class Pure(Trait["Statement"]):
1919
2020
2121@dataclass (frozen = True )
22- class MaybePure (Trait [ "Statement" ] ):
22+ class MaybePure (StmtTrait ):
2323 """A trait that indicates the statement may be pure,
2424 i.e., a call statement can be pure if the callee is pure.
2525 """
@@ -48,7 +48,7 @@ def set_pure(cls, stmt: "Statement") -> None:
4848
4949
5050@dataclass (frozen = True )
51- class ConstantLike (Trait [ "Statement" ] ):
51+ class ConstantLike (StmtTrait ):
5252 """A trait that indicates that a statement is constant-like, i.e., it
5353 represents a constant value.
5454 """
@@ -57,7 +57,7 @@ class ConstantLike(Trait["Statement"]):
5757
5858
5959@dataclass (frozen = True )
60- class IsTerminator (Trait [ "Statement" ] ):
60+ class IsTerminator (StmtTrait ):
6161 """A trait that indicates that a statement is a terminator, i.e., it
6262 terminates a block.
6363 """
@@ -66,19 +66,19 @@ class IsTerminator(Trait["Statement"]):
6666
6767
6868@dataclass (frozen = True )
69- class NoTerminator (Trait [ "Statement" ] ):
69+ class NoTerminator (StmtTrait ):
7070 """A trait that indicates that the region of a statement has no terminator."""
7171
7272 pass
7373
7474
7575@dataclass (frozen = True )
76- class IsolatedFromAbove (Trait [ "Statement" ] ):
76+ class IsolatedFromAbove (StmtTrait ):
7777 pass
7878
7979
8080@dataclass (frozen = True )
81- class HasParent (Trait [ "Statement" ] ):
81+ class HasParent (StmtTrait ):
8282 """A trait that indicates that a statement has a parent
8383 statement.
8484 """
0 commit comments