Renamer done.

It renames bound variables to numbers, converts let to lambda, and
removes all variables from binds
This commit is contained in:
sebastianselander 2023-02-14 16:44:38 +01:00
parent 53314551f5
commit 6218efac20
9 changed files with 158 additions and 175 deletions

View file

@ -1,14 +1,19 @@
{-# LANGUAGE LambdaCase #-}
module TypeChecker.TypeCheckerIr (module Grammar.Abs, Exp) where
module TypeChecker.TypeCheckerIr where
import Grammar.Abs (Program(..), Ident(..), Bind(..), Const(..), Type(..), UIdent(..), LIdent(..))
import Renamer.RenamerIr
data Exp
= EAnn Exp Type
| EId Ident Type
| EConst Const Type
| EApp Exp Exp Type
| EAdd Exp Exp Type
| EAbs Ident Exp Type
deriving (Eq, Ord, Show, Read)
data TProgram = TProgram [TBind]
data TBind = TBind Ident Type TExp
data TExp
= TAnn TExp Type
| TBound Integer Ident Type
| TFree Ident Type
| TConst Const Type
| TApp TExp TExp Type
| TAdd TExp TExp Type
| TAbs Integer Ident TExp Type
deriving (Eq, Ord, Show, Read)