add impossible clauses (not checked yet)

This commit is contained in:
2025-11-14 10:53:35 -08:00
parent a0bab1cf5c
commit 79113fbce5
5 changed files with 140 additions and 96 deletions

View File

@@ -593,3 +593,27 @@ lookupMeta ix@(QN ns nm) = do
mkCtx : FC -> Context
mkCtx fc = MkCtx 0 Nil Nil Nil fc
data Pattern
= PatVar FC Icit Name
| PatCon FC Icit QName (List Pattern) (Maybe Name)
| PatWild FC Icit
| PatLit FC Literal
| PatImpossible FC
getIcit : Pattern -> Icit
getIcit (PatVar x icit str) = icit
getIcit (PatCon x icit str xs as) = icit
getIcit (PatWild x icit) = icit
getIcit (PatLit fc lit) = Explicit
getIcit (PatImpossible _) = Explicit
instance HasFC Pattern where
getFC (PatVar fc _ _) = fc
getFC (PatCon fc _ _ _ _) = fc
getFC (PatWild fc _) = fc
getFC (PatLit fc lit) = fc
getFC (PatImpossible fc) = fc
data Constraint = PC String Pattern