Right#
- class hugr.val.Right(left_typ: Iterable[tys.Type], vals: Iterable[Value])[source]#
Bases:
Sum
Right variant of a
tys.Either
type, containing a list of values.In fallible contexts, this represents the success variant.
Internally a
Sum
with two variant rows.Example
>>> right = Right([tys.Bool, tys.Bool, tys.Bool], [TRUE, FALSE]) >>> str(right) 'Right(TRUE, FALSE)' >>> str(right.type_()) 'Either((Bool, Bool, Bool), (Bool, Bool))'
Methods
Report the type of the value.
Attributes
n_variants
Tag identifying the variant.
defines all possible variants.
The values of this variant row.