Lang types
lang_types
¶
LIST_ELEMENT_TYPE = ListLangBool | ListLangInt
module-attribute
¶
ListLangType
¶
Source code in xdsl/frontend/listlang/lang_types.py
from_xdsl(xdsl_type: Attribute) -> ListLangType
staticmethod
¶
Source code in xdsl/frontend/listlang/lang_types.py
__str__() -> str
¶
Source code in xdsl/frontend/listlang/lang_types.py
xdsl() -> Attribute
¶
Source code in xdsl/frontend/listlang/lang_types.py
print(builder: Builder, value: SSAValue)
¶
Source code in xdsl/frontend/listlang/lang_types.py
ListLangInt
dataclass
¶
Bases: ListLangType
Source code in xdsl/frontend/listlang/lang_types.py
ListLangBool
dataclass
¶
Bases: ListLangType
Source code in xdsl/frontend/listlang/lang_types.py
ListLangList
dataclass
¶
Bases: ListLangType
Source code in xdsl/frontend/listlang/lang_types.py
TypedExpression
dataclass
¶
Method
¶
Source code in xdsl/frontend/listlang/lang_types.py
name: str
instance-attribute
¶
get_lambda_arg_type(x: ListLangType) -> Sequence[ListLangType] | None
¶
From the type on which the method was invoked, returns the types of the arguments of the method's lambda if there is one, or None if there is no lambda.
Source code in xdsl/frontend/listlang/lang_types.py
build(builder: Builder, x: Located[TypedExpression], lambd: Located[tuple[Block, ListLangType]] | None) -> TypedExpression
¶
Builds the method's execution.
lambd contains a free-standing block containing the lambda
instructions that must be inlined as needed, and the type of the final
expression of the block. The associated location is the location of
the result expression.
Source code in xdsl/frontend/listlang/lang_types.py
ListLenMethod
¶
Bases: Method
Source code in xdsl/frontend/listlang/lang_types.py
name = 'len'
class-attribute
instance-attribute
¶
get_lambda_arg_type(x: ListLangType) -> Sequence[ListLangType] | None
¶
build(builder: Builder, x: Located[TypedExpression], lambd: Located[tuple[Block, ListLangType]] | None) -> TypedExpression
¶
Source code in xdsl/frontend/listlang/lang_types.py
ListMapMethod
¶
Bases: Method