Use deriving
Some checks failed
Publish Playground / build (push) Has been cancelled
Publish Playground / deploy (push) Has been cancelled

This commit is contained in:
2026-02-24 21:15:41 -08:00
parent 79ed4bf2c2
commit c15f22a180
10 changed files with 69 additions and 257 deletions

View File

@@ -744,11 +744,7 @@ tail Nil = Nil
tail (x :: xs) = xs
data Ordering = LT | EQ | GT
instance Eq Ordering where
LT == LT = True
EQ == EQ = True
GT == GT = True
_ == _ = False
derive Eq Ordering
pfunc jsCompare uses (EQ LT GT) : a. a a Ordering := `(_, a, b) => a == b ? Prelude_EQ : a < b ? Prelude_LT : Prelude_GT`