check impossible clauses

Also clean up some comments.

We now have types in constraints, but are still using values from
context.
This commit is contained in:
2025-11-14 21:45:19 -08:00
parent 79113fbce5
commit 63687499dc
10 changed files with 169 additions and 153 deletions

View File

@@ -615,5 +615,13 @@ instance HasFC Pattern where
getFC (PatLit fc lit) = fc
getFC (PatImpossible fc) = fc
data Constraint = PC String Pattern
instance Show Pattern where
show (PatVar _ icit str) = "(PatVar " ++ show icit ++ " " ++ show str ++ ")"
show (PatImpossible _) = "PatImp"
show (PatCon _ icit str xs as) = "(PatCon " ++ show icit ++ " " ++ show str ++ " " ++ show xs ++ " " ++ show as ++ ")"
show (PatWild _ icit) = "(PatWild " ++ show icit ++ ")"
show (PatLit _ lit) = "(PatLit " ++ show lit ++ ")"
data Constraint = PC String Pattern Val
instance Show Constraint where
show (PC nm pat ty) = show (nm,pat,ty)