on master help sign in
Comments to Lang.hs to disambiguate the LIR.
de35d66Apostolis Xekoukoulotakis
src/IRTS/Lang.hs+2−1
@@ -17,10 +17,11 @@ data LVar = Loc Int | Glob Name
17 deriving (Show, Eq)
17 deriving (Show, Eq)
18
18
19-- ASSUMPTION: All variable bindings have unique names here
19-- ASSUMPTION: All variable bindings have unique names here
20+-- Constructors commented as lifted are not present in the LIR provided to the different backends.
20data LExp = LV LVar
21data LExp = LV LVar
21 | LApp Bool LExp [LExp] -- True = tail call
22 | LApp Bool LExp [LExp] -- True = tail call
22 | LLazyApp Name [LExp] -- True = tail call
23 | LLazyApp Name [LExp] -- True = tail call
23− | LLazyExp LExp
24+ | LLazyExp LExp -- lifted out before compiling
24 | LForce LExp -- make sure Exp is evaluted
25 | LForce LExp -- make sure Exp is evaluted
25 | LLet Name LExp LExp -- name just for pretty printing
26 | LLet Name LExp LExp -- name just for pretty printing
26 | LLam [Name] LExp -- lambda, lifted out before compiling
27 | LLam [Name] LExp -- lambda, lifted out before compiling