Started implementing pattern matching on data types.

This commit is contained in:
Samuel Hammersberg 2023-03-22 11:41:02 +01:00
parent d36370329e
commit feeef18cfd
2 changed files with 50 additions and 20 deletions

View file

@ -19,7 +19,7 @@ data Exp
data Injection = Injection Case ExpT
deriving (Show, Ord, Eq)
data Case = CLit Lit | CatchAll
data Case = CLit Lit | CCons Id | CatchAll
deriving (Show, Ord, Eq)
data Constructor = Constructor Ident [Type]