uhc-light-1.1.7.3: 103/lib/ag/CoreRun/AbsSyn.ag
DATA Mod
| Mod ref2nm : {Ref2Nm} -- inverse lookup of locally introduced binding RRef's
moduleNm : {HsName}
moduleNr : {Int} -- sequence nr, index later into global table of modules
stkDepth : {Int} -- max depth of stack for setting up globals
binds : {CRArray Bind}
body : Exp
DATA SExp
-- base cases
| Var ref : {RRef}
| Int int : {Int}
| Char char : {Char}
| String str : {String}
| Integer integer : {Integer}
DATA Exp
-- base cases
| SExp sexpr : SExp
-- node constructor, tuple or data constructor, determined by tag
| Tup tag : {CTag}
args : {CRArray Exp}
-- let bindings, recursiveness allowed, yes/no eval made explicit in rhs of binding
| Let lev : {Int}
firstOff : {Int} -- offset of first binding
ref2nm : {Ref2Nm} -- inverse lookup of locally introduced binding RRef's
binds : {CRArray Bind}
body : Exp
-- application, abstraction
| App -- isTailRec : {Bool}
func : Exp
args : {CRArray Exp}
| Lam mbNm : {Maybe HsName} -- possibly bound to name
lev : {Int} -- lexical level
nrArgs : {Int} -- nr of arguments, 0 means it is a thunk
nrBinds : {Int} -- nr stack frame locations to be allocated (excluding arguments) for locals
stkDepth : {Int} -- max depth of stack
ref2nm : {Ref2Nm} -- inverse lookup of locally introduced binding RRef's
body : Exp
-- thunking, forcing, partial applications
| Force expr : Exp
-- | Thunk expr : Exp -- expressed as parameterless Lam
-- expr in a context to which must be returned (i.e. no tail rec)
| Ret expr : Exp
-- expr in a case alternative result context (with local bindings to be removed)
| RetCase nrBinds : {Int}
expr : Exp
-- Tail context
| Tail expr : Exp
-- case
| Case expr : SExp
alts : {CRArray Alt}
-- FFI call
| FFI prim : {RunPrim}
args : {CRArray Exp}
{-
| FFI callconv : {FFIWay}
impEnt : {ForeignEnt}
ty : {Ty}
args : {CRArray Exp}
-}
-- Debug only
| Dbg msg : {String}
DATA Alt
| Alt ref2nm : {Ref2Nm} -- inverse lookup of locally introduced binding RRef's
pat : Pat
expr : Exp
DATA Pat
| Con tag : {CTag}
| BoolExpr expr : Exp
SET AllNT
= Mod SExp Exp Alt Pat