Extension

class hugr.val.Extension(name: str, typ: ~hugr.tys.Type, val: ~typing.Any, extensions: list[str] = <factory>)[source]

Bases: Value

Non-core extension value.

Methods

to_model

type_

Report the type of the value.

Attributes

name

Value name.

typ

Value type.

val

Value payload.

extensions

Extension set.

extensions: list[str]

Extension set. Deprecated, no longer used. Will be removed in hugr v0.13.

name: str

Value name.

typ: Type

Value type.

type_() Type[source]

Report the type of the value.

Example

>>> TRUE.type_()
Bool
val: Any

Value payload.