package catala

  1. Overview
  2. Docs
Low-level language for tax code specification

Install

Dune Dependency

Authors

Maintainers

Sources

0.3.0.tar.gz
md5=4a2c5495f30d8fc2e3bf977df6e602f9
sha512=8dcc404b6068b9dbd76982ade60d8fba1950fdd0a8a626db17429120483367dce1f51997e96d7b8ee5308f305c3bcbb897ef85336f25e9ef3681f4cb9237f56a

doc/catala.scopelang/Scopelang/Ast/index.html

Module Scopelang.AstSource

Abstract syntax tree of the scope language

Identifiers

Sourcemodule ScopeName = Dcalc.Ast.ScopeName
Sourcemodule ScopeMap : Map.S with type key = ScopeName.t
Sourcemodule ScopeVarSet : Set.S with type elt = ScopeVar.t
Sourcemodule ScopeVarMap : Map.S with type key = ScopeVar.t
Sourcemodule StructName = Dcalc.Ast.StructName
Sourcemodule StructMap = Dcalc.Ast.StructMap
Sourcemodule StructFieldName = Dcalc.Ast.StructFieldName
Sourcemodule EnumName = Dcalc.Ast.EnumName
Sourcemodule EnumMap = Dcalc.Ast.EnumMap
Sourcemodule EnumConstructor = Dcalc.Ast.EnumConstructor

Abstract syntax tree

Sourcetype typ =
  1. | TLit of Dcalc.Ast.typ_lit
  2. | TStruct of StructName.t
  3. | TEnum of EnumName.t
  4. | TArrow of typ Utils.Pos.marked * typ Utils.Pos.marked
  5. | TArray of typ
  6. | TAny

The expressions use the Bindlib library, based on higher-order abstract syntax

Sourceval locations_used : expr Utils.Pos.marked -> LocationSet.t
Sourcetype scope_decl = {
  1. scope_decl_name : ScopeName.t;
  2. scope_sig : typ Utils.Pos.marked ScopeVarMap.t;
  3. scope_decl_rules : rule list;
}
Sourcetype program = {
  1. program_scopes : scope_decl ScopeMap.t;
  2. program_enums : enum_ctx;
  3. program_structs : struct_ctx;
}

Variable helpers

Sourcemodule Var : sig ... end
Sourcemodule VarMap : Map.S with type key = Var.t
Sourcetype vars = expr Bindlib.mvar
Sourceval make_var : Var.t Utils.Pos.marked -> expr Utils.Pos.marked Bindlib.box
Sourceval make_abs : vars -> expr Utils.Pos.marked Bindlib.box -> Utils.Pos.t -> typ Utils.Pos.marked list -> Utils.Pos.t -> expr Utils.Pos.marked Bindlib.box
Sourceval make_app : expr Utils.Pos.marked Bindlib.box -> expr Utils.Pos.marked Bindlib.box list -> Utils.Pos.t -> expr Utils.Pos.marked Bindlib.box
Sourceval make_let_in : Var.t -> typ Utils.Pos.marked -> expr Utils.Pos.marked Bindlib.box -> expr Utils.Pos.marked Bindlib.box -> expr Utils.Pos.marked Bindlib.box
OCaml

Innovation. Community. Security.