No more warnings, but everything to do with datatypes is outcommented.
This commit is contained in:
parent
6cbc83c5d9
commit
75fa232e21
4 changed files with 172 additions and 193 deletions
|
|
@ -18,7 +18,7 @@ monoDef (T.DBind bind) = DBind $ monoBind bind
|
|||
monoDef (T.DData d) = DData d
|
||||
|
||||
monoBind :: T.Bind -> Bind
|
||||
monoBind (T.Bind name args (e, t)) = Bind name args (monoExpr e, monoType t)
|
||||
monoBind (T.Bind name args (e, t)) = Bind (monoId name) (map monoId args) (monoExpr e, monoType t)
|
||||
|
||||
monoExpr :: T.Exp -> M.Exp
|
||||
monoExpr = \case
|
||||
|
|
@ -40,7 +40,7 @@ monoexpt :: T.ExpT -> M.ExpT
|
|||
monoexpt (e, t) = (monoExpr e, monoType t)
|
||||
|
||||
monoId :: T.Id -> Id
|
||||
monoId = id
|
||||
monoId (n,t) = (n, monoType t)
|
||||
|
||||
monoLit :: T.Lit -> Lit
|
||||
monoLit (T.LInt i) = LInt i
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ module Monomorphizer.MonomorphizerIr (module Monomorphizer.MonomorphizerIr, modu
|
|||
import Grammar.Abs (Data (..), Ident (..), Init (..))
|
||||
import qualified Grammar.Abs as GA (Data (..), Ident (..),
|
||||
Init (..))
|
||||
import qualified TypeChecker.TypeCheckerIr as RE (Id, Indexed)
|
||||
import TypeChecker.TypeCheckerIr (Id, Indexed)
|
||||
import qualified TypeChecker.TypeCheckerIr as RE (Indexed)
|
||||
import TypeChecker.TypeCheckerIr (Indexed)
|
||||
|
||||
type Id = (Ident, Type)
|
||||
|
||||
newtype Program = Program [Def]
|
||||
deriving (Show, Ord, Eq)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue