Skip to content

Commit

Permalink
improve cmp_BinInt
Browse files Browse the repository at this point in the history
  • Loading branch information
johnynek committed Apr 10, 2024
1 parent 1a249de commit d7d1e03
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test_workspace/BinInt.bosatsu
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ def cmp(a: BinInt, b: BinInt) -> Comparison:
match b:
case BWNot(b):
# -a - 1 <> -b - 1 == (a <> b).invert
match cmp_BinNat(a, b):
case GT: LT
case LT: GT
case EQ: EQ
cmp_BinNat(b, a)
case FromBinNat(_): LT

def eq(a: BinInt, b: BinInt) -> Bool:
Expand Down

0 comments on commit d7d1e03

Please sign in to comment.