add enums, which also need whnf to be fallible :(

This commit is contained in:
rhiannon morris 2023-02-22 07:45:10 +01:00
parent 0e481a8098
commit efca9a7138
11 changed files with 269 additions and 64 deletions

View file

@ -37,6 +37,12 @@ mutual
Pair fst1 snd1 == Pair fst2 snd2 = fst1 == fst2 && snd1 == snd2
Pair {} == _ = False
Enum ts1 == Enum ts2 = ts1 == ts2
Enum _ == _ = False
Tag t1 == Tag t2 = t1 == t2
Tag _ == _ = False
Eq ty1 l1 r1 == Eq ty2 l2 r2 =
ty1 == ty2 && l1 == l2 && r1 == r2
Eq {} == _ = False
@ -74,6 +80,10 @@ mutual
q1 == q2 && p1 == p2 && r1 == r2 && b1 == b2
CasePair {} == _ = False
CaseEnum q1 t1 r1 a1 == CaseEnum q2 t2 r2 a2 =
q1 == q2 && t1 == t2 && r1 == r2 && a1 == a2
CaseEnum {} == _ = False
(fun1 :% dim1) == (fun2 :% dim2) = fun1 == fun2 && dim1 == dim2
(_ :% _) == _ = False