package catala

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
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
and naked_expr =
  1. | EVar of VarName.t
  2. | EFunc of FuncName.t
  3. | EStruct of {
    1. fields : expr Shared_ast.StructField.Map.t;
    2. name : Shared_ast.StructName.t;
    }
  4. | EStructFieldAccess of {
    1. e1 : expr;
    2. field : Shared_ast.StructField.t;
    3. name : Shared_ast.StructName.t;
    }
  5. | ETuple of expr list
  6. | ETupleAccess of {
    1. e1 : expr;
    2. index : int;
    }
  7. | EInj of {
    1. e1 : expr;
    2. cons : Shared_ast.EnumConstructor.t;
    3. name : Shared_ast.EnumName.t;
    4. expr_typ : Shared_ast.typ;
    }
  8. | EArray of expr list
  9. | ELit of Shared_ast.lit
  10. | EApp of {
    1. f : expr;
    2. args : expr list;
    }
  11. | EAppOp of {
    1. op : operator Catala_utils.Mark.pos;
    2. args : expr list;
    }
  12. | EExternal of {
    1. modname : VarName.t Catala_utils.Mark.pos;
    2. name : string Catala_utils.Mark.pos;
    }
type stmt =
  1. | SInnerFuncDef of {
    1. name : VarName.t Catala_utils.Mark.pos;
    2. func : func;
    }
  2. | SLocalDecl of {
    1. name : VarName.t Catala_utils.Mark.pos;
    2. typ : Shared_ast.typ;
    }
  3. | SLocalInit of {
    1. name : VarName.t Catala_utils.Mark.pos;
    2. typ : Shared_ast.typ;
    3. expr : expr;
    }
  4. | SLocalDef of {
    1. name : VarName.t Catala_utils.Mark.pos;
    2. expr : expr;
    3. typ : Shared_ast.typ;
    }
  5. | STryWEmpty of {
    1. try_block : block;
    2. with_block : block;
    }
  6. | SRaiseEmpty
  7. | SFatalError of Shared_ast.Runtime.error
  8. | SIfThenElse of {
    1. if_expr : expr;
    2. then_block : block;
    3. else_block : block;
    }
  9. | SSwitch of {
    1. switch_expr : expr;
    2. switch_expr_typ : Shared_ast.typ;
    3. enum_name : Shared_ast.EnumName.t;
    4. switch_cases : switch_case list;
    }
  10. | SReturn of naked_expr
  11. | SAssert of naked_expr
  12. | SSpecialOp of special_operator
and special_operator =
  1. | OHandleDefaultOpt of {
    1. exceptions : expr list;
    2. just : expr;
    3. cons : block;
    4. return_typ : Shared_ast.typ;
    }
and block = stmt Catala_utils.Mark.pos list
and switch_case = {
  1. case_block : block;
  2. payload_var_name : VarName.t;
  3. payload_var_typ : Shared_ast.typ;
}
and func = {
  1. func_params : (VarName.t Catala_utils.Mark.pos * Shared_ast.typ) list;
  2. func_body : block;
  3. func_return_typ : Shared_ast.typ;
}
type scope_body = {
  1. scope_body_name : Shared_ast.ScopeName.t;
  2. scope_body_var : FuncName.t;
  3. scope_body_func : func;
}
type code_item =
  1. | SVar of {
    1. var : VarName.t;
    2. expr : expr;
    3. typ : Shared_ast.typ;
    }
  2. | SFunc of {
    1. var : FuncName.t;
    2. func : func;
    }
  3. | SScope of scope_body
type ctx = {
  1. decl_ctx : Shared_ast.decl_ctx;
  2. modules : VarName.t Shared_ast.ModuleName.Map.t;
}
type program = {
  1. ctx : ctx;
  2. code_items : code_item list;
  3. module_name : Shared_ast.ModuleName.t option;
}
OCaml

Innovation. Community. Security.