Got some more stuff working.

This commit is contained in:
Samuel Hammersberg 2023-03-24 13:55:06 +01:00
parent f4163bbb7d
commit 50bea83a18
3 changed files with 338 additions and 328 deletions

View file

@ -1,8 +1,8 @@
module Monomorphizer.MonomorphizerIr (module Monomorphizer.MonomorphizerIr, module RE, module GA) where
import Grammar.Abs (Ident (..), Init (..), UIdent)
import Grammar.Abs qualified as GA (Ident (..), Init (..))
import TypeChecker.TypeCheckerIr qualified as RE
import Grammar.Abs (Ident (..), Init (..), UIdent)
import qualified Grammar.Abs as GA (Ident (..), Init (..))
import qualified TypeChecker.TypeCheckerIr as RE
type Id = (Ident, Type)
@ -12,7 +12,7 @@ newtype Program = Program [Def]
data Def = DBind Bind | DData Data
deriving (Show, Ord, Eq)
data Data = Data Type Constructor
data Data = Data Type [Constructor]
deriving (Show, Ord, Eq)
data Bind = Bind Id [Id] ExpT
@ -45,4 +45,4 @@ data Type = TLit Ident | TFun Type Type
flattenType :: Type -> [Type]
flattenType (TFun t1 t2) = t1 : flattenType t2
flattenType x = [x]
flattenType x = [x]