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:
@@ -8,6 +8,7 @@ import Lib.Types
|
||||
|
||||
Raw : U
|
||||
|
||||
-- Maybe this moves to Elab..
|
||||
record Clause where
|
||||
constructor MkClause
|
||||
clauseFC : FC
|
||||
@@ -120,10 +121,7 @@ foo : List String -> String
|
||||
foo ts = "(" ++ unwords ts ++ ")"
|
||||
|
||||
instance Show Raw
|
||||
instance Show Pattern
|
||||
|
||||
instance Show Constraint where
|
||||
show (PC nm pat) = show (nm,pat)
|
||||
|
||||
instance Show Clause where
|
||||
show (MkClause fc cons pats expr) = show (fc, cons, pats, expr)
|
||||
@@ -154,14 +152,6 @@ instance Show Module where
|
||||
show (MkModule name imports decls) = foo ("MkModule" :: show name :: show imports :: show decls :: Nil)
|
||||
|
||||
|
||||
instance Show Pattern where
|
||||
show (PatVar _ icit str) = foo ("PatVar" :: show icit :: show str :: Nil)
|
||||
show (PatImpossible _) = "PatImp"
|
||||
show (PatCon _ icit str xs as) = foo ("PatCon" :: show icit :: show str :: show xs :: show as :: Nil)
|
||||
show (PatWild _ icit) = foo ("PatWild" :: show icit :: Nil)
|
||||
show (PatLit _ lit) = foo ("PatLit" :: show lit :: Nil)
|
||||
|
||||
|
||||
instance Show RCaseAlt where
|
||||
show (MkAlt x y)= foo ("MkAlt" :: show x :: show y :: Nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user