Lambda
(* The Lambda intermediate language of the MLPolyR compiler.
* Lambda is the output of the Translate phase. *)
datatype exp =
VALUE of value
| LET of lvar * exp * exp
| FIX of function list * exp
| ARITH of Oper.arithop * exp * exp
| RECORD of { purity: purity, len: exp, slices: slice list }
| SELECT of exp * exp * purity
| UPDATE of exp * exp * exp
| CMP of Oper.cmpop * exp * exp * exp * exp
| APP of purity * exp * exp list
and slice =
SGT of exp
| SEQ of { base: exp, start: exp, stop: exp }
(* the boolean flag, when set to true, is a strong
* hint to have this function inlined *)
withtype function = lvar * lvar list * exp * bool