Skip to content

Commit

Permalink
fix: Serialisation of bool values (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-koch authored Jun 12, 2024
1 parent e68066c commit 16a77db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions guppylang/prelude/_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ class ConstF64(BaseModel):

def bool_value(b: bool) -> ops.Value:
"""Returns the Hugr representation of a boolean value."""
unit = ops.Value(ops.TupleValue(vs=[]))
return ops.Value(
ops.SumValue(tag=int(b), typ=tys.SumType(tys.UnitSum(size=2)), vs=[unit])
ops.SumValue(tag=int(b), typ=tys.SumType(tys.UnitSum(size=2)), vs=[])
)


Expand Down

0 comments on commit 16a77db

Please sign in to comment.