From 16a77dbd4c5905eff6c4ddabe66b5ef1b8a7e15b Mon Sep 17 00:00:00 2001 From: Mark Koch <48097969+mark-koch@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:15:49 +0100 Subject: [PATCH] fix: Serialisation of bool values (#239) --- guppylang/prelude/_internal.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guppylang/prelude/_internal.py b/guppylang/prelude/_internal.py index 9db3f70e..d1f806eb 100644 --- a/guppylang/prelude/_internal.py +++ b/guppylang/prelude/_internal.py @@ -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=[]) )