Right¶
- class hugr.val.Right(left_typ: Iterable[tys.Type], vals: Iterable[Value])[source]¶
Bases:
SumRight variant of a
tys.Eithertype, containing a list of values.In fallible contexts, this represents the success variant.
Internally a
Sumwith 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
to_modelReport the type of the value.
Attributes
n_variantsTag identifying the variant.
defines all possible variants.
The values of this variant row.