Add bidirectional type checker, lambda lifter.

This commit is contained in:
Martin Fredin 2023-02-18 14:49:33 +01:00
parent 2fa30faa87
commit ac3f222753
22 changed files with 2440 additions and 577 deletions

View file

@ -11,8 +11,9 @@ module Codegen.LlvmIr (
ToIr(..)
) where
import Data.List (intercalate)
import Grammar.Abs (Ident (..))
import Data.List (intercalate)
import Grammar.Abs (Character)
import TypeChecker.TypeCheckerIr (Ident (..))
data CallingConvention = TailCC | FastCC | CCC | ColdCC deriving Show
instance ToIr CallingConvention where
@ -87,7 +88,7 @@ instance ToIr Visibility where
-- or a string contstant
data LLVMValue
= VInteger Integer
| VChar Char
| VChar Character
| VIdent Ident LLVMType
| VConstant String
| VFunction Ident Visibility LLVMType