Scalc.Astmodule L = Lcalc.Astmodule FuncName : sig ... endmodule VarName : sig ... endtype operator = Shared_ast.lcalc Shared_ast.operatortype expr = naked_expr Catala_utils.Mark.posand naked_expr = | EVar of VarName.t| EFunc of FuncName.t| EStruct of {fields : expr Shared_ast.StructField.Map.t;name : Shared_ast.StructName.t;}| EStructFieldAccess of {e1 : expr;field : Shared_ast.StructField.t;name : Shared_ast.StructName.t;}| ETuple of expr list| ETupleAccess of {e1 : expr;index : int;typ : Shared_ast.typ;}| EInj of {e1 : expr;cons : Shared_ast.EnumConstructor.t;name : Shared_ast.EnumName.t;expr_typ : Shared_ast.typ;}| EArray of expr list| ELit of Shared_ast.lit| EPosLit| EApp of {f : expr;args : expr list;typ : Shared_ast.typ;poly : bool;}typ is the return type ; poly indicates if the function return is polymorphic (in which case the return value might need a cast)
| EAppOp of {op : operator Catala_utils.Mark.pos;args : expr list;tys : Shared_ast.typ list;}| EExternal of {modname : VarName.t Catala_utils.Mark.pos;name : string Catala_utils.Mark.pos;}type stmt = | SInnerFuncDef of {name : VarName.t Catala_utils.Mark.pos;func : func;}| SLocalDecl of {name : VarName.t Catala_utils.Mark.pos;typ : Shared_ast.typ;}| SLocalInit of {name : VarName.t Catala_utils.Mark.pos;typ : Shared_ast.typ;expr : expr;}| SLocalDef of {name : VarName.t Catala_utils.Mark.pos;typ : Shared_ast.typ;expr : expr;}| SFatalError of {pos_expr : expr;error : Catala_runtime.error;}pos_expr here is the position reified into an expression
| SIfThenElse of {}| SSwitch of {switch_var : VarName.t;switch_var_typ : Shared_ast.typ;enum_name : Shared_ast.EnumName.t;switch_cases : switch_case list;}| SReturn of expr| SAssert of {}pos_expr here is the position reified into an expression
| SSpecialOp of special_operatorand block = stmt Catala_utils.Mark.pos listand switch_case = {case_block : block;payload_var_name : VarName.t;payload_var_typ : Shared_ast.typ;}and func = {func_params : (VarName.t Catala_utils.Mark.pos * Shared_ast.typ) list;func_body : block;func_return_typ : Shared_ast.typ;}type scope_body = {scope_body_name : Shared_ast.ScopeName.t;scope_body_var : FuncName.t;scope_body_func : func;scope_body_visibility : Shared_ast.visibility;}type code_item = | SVar of {var : VarName.t;expr : expr;typ : Shared_ast.typ;visibility : Shared_ast.visibility;}| SFunc of {var : FuncName.t;func : func;visibility : Shared_ast.visibility;}| SScope of scope_bodytype program = {ctx : ctx;code_items : code_item list;tests : code_item list * (Shared_ast.ScopeName.t * block) list;The first element may contain lifted closures. It can be assumed to be empty when closure conversion is disabled.
*)module_name : (Shared_ast.ModuleName.t * Shared_ast.module_intf_id) option;}