Scalc.Ast
module D = Dcalc.Ast
module L = Lcalc.Ast
module FuncName : sig ... end
module VarName : sig ... end
val dead_value : VarName.t
val handle_default : FuncName.t
val handle_default_opt : FuncName.t
type operator =
< overloaded : Shared_ast.no
; monomorphic : Shared_ast.yes
; polymorphic : Shared_ast.yes
; resolved : Shared_ast.yes >
Shared_ast.operator
type expr = naked_expr Catala_utils.Mark.pos
and naked_expr =
| EVar : VarName.t -> naked_expr |
| EFunc : FuncName.t -> naked_expr |
| EStruct : expr list * Shared_ast.StructName.t -> naked_expr |
| EStructFieldAccess : expr
* Shared_ast.StructField.t
* Shared_ast.StructName.t -> naked_expr |
| EInj : expr
* Shared_ast.EnumConstructor.t
* Shared_ast.EnumName.t -> naked_expr |
| EArray : expr list -> naked_expr |
| ELit : Shared_ast.lit -> naked_expr |
| EApp : expr * expr list -> naked_expr |
| EOp : operator -> naked_expr |
type stmt =
| SInnerFuncDef of VarName.t Catala_utils.Mark.pos * func | |
| SLocalDecl of VarName.t Catala_utils.Mark.pos * Shared_ast.typ | |
| SLocalDef of VarName.t Catala_utils.Mark.pos * expr | |
| STryExcept of block * Shared_ast.except * block | |
| SRaise of Shared_ast.except | |
| SIfThenElse of expr * block * block | |
| SSwitch of expr * Shared_ast.EnumName.t * (block * VarName.t) list | (* Each block corresponds to one case of the enum *) |
| SReturn of naked_expr | |
| SAssert of naked_expr |
and block = stmt Catala_utils.Mark.pos list
and func = {
func_params : (VarName.t Catala_utils.Mark.pos * Shared_ast.typ) list; |
func_body : block; |
}
type scope_body = {
scope_body_name : Shared_ast.ScopeName.t; |
scope_body_var : FuncName.t; |
scope_body_func : func; |
}
type code_item =
| SVar of {
} | ||
| SFunc of {
} | ||
| SScope of scope_body |