initial pattern matching implementation. should be somewhat correct

This commit is contained in:
sebastian 2023-03-21 14:33:18 +01:00
parent 9cd2cdb511
commit 4c015a4aac
3 changed files with 32 additions and 28 deletions

View file

@ -23,12 +23,13 @@ data Poly = Forall [Ident] Type
deriving (Show)
newtype Ctx = Ctx {vars :: Map Ident Poly}
deriving Show
data Env = Env
{ count :: Int
, sigs :: Map Ident Type
, constructors :: Map Ident Type
}
} deriving Show
type Error = String
type Subst = Map Ident Type