package catala
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Compiler and library for the literate programming language for tax code specification
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.6.0.tar.gz
md5=b22e238d5d5c8452067109e9c7c0f427
sha512=ccc8c557c67c2f9d1bed4b957b2367f0f6afc0ef9b8b83237cf2a2912b3e8829b7e8af78ea7fe00b20ecf28b436ad04b591e5fff4f82fd08725d40a18c9924d0
doc/catala.desugared/Desugared/Ast/index.html
Module Desugared.AstSource
Abstract syntax tree of the desugared representation
Names, Maps and Keys
Inside a scope, a definition can refer either to a scope def, or a subscope def
AST
Source
type location = | ScopeVar of ScopeVar.t Utils.Pos.marked * StateName.t option| SubScopeVar of Scopelang.Ast.ScopeName.t * Scopelang.Ast.SubScopeName.t Utils.Pos.marked * ScopeVar.t Utils.Pos.marked
Expressions
Source
type expr = | ELocation of location| EVar of expr Bindlib.var Utils.Pos.marked| EStruct of Scopelang.Ast.StructName.t * expr Utils.Pos.marked Scopelang.Ast.StructFieldMap.t| EStructAccess of expr Utils.Pos.marked * Scopelang.Ast.StructFieldName.t * Scopelang.Ast.StructName.t| EEnumInj of expr Utils.Pos.marked * Scopelang.Ast.EnumConstructor.t * Scopelang.Ast.EnumName.t| EMatch of expr Utils.Pos.marked * Scopelang.Ast.EnumName.t * expr Utils.Pos.marked Scopelang.Ast.EnumConstructorMap.t| ELit of Dcalc.Ast.lit| EAbs of (expr, expr Utils.Pos.marked) Bindlib.mbinder Utils.Pos.marked * Scopelang.Ast.typ Utils.Pos.marked list| EApp of expr Utils.Pos.marked * expr Utils.Pos.marked list| EOp of Dcalc.Ast.operator| EDefault of expr Utils.Pos.marked list * expr Utils.Pos.marked * expr Utils.Pos.marked| EIfThenElse of expr Utils.Pos.marked * expr Utils.Pos.marked * expr Utils.Pos.marked| EArray of expr Utils.Pos.marked list| ErrorOnEmpty of expr Utils.Pos.marked
The expressions use the Bindlib library, based on higher-order abstract syntax
Variable helpers
Source
val make_abs :
vars ->
expr Utils.Pos.marked Bindlib.box ->
Utils.Pos.t ->
Scopelang.Ast.typ Utils.Pos.marked list ->
Utils.Pos.t ->
expr Utils.Pos.marked Bindlib.boxSource
val make_app :
expr Utils.Pos.marked Bindlib.box ->
expr Utils.Pos.marked Bindlib.box list ->
Utils.Pos.t ->
expr Utils.Pos.marked Bindlib.boxSource
val make_let_in :
Var.t ->
Scopelang.Ast.typ Utils.Pos.marked ->
expr Utils.Pos.marked Bindlib.box ->
expr Utils.Pos.marked Bindlib.box ->
expr Utils.Pos.marked Bindlib.boxRules and scopes
Source
type rule = {rule_id : RuleName.t;rule_just : expr Utils.Pos.marked Bindlib.box;rule_cons : expr Utils.Pos.marked Bindlib.box;rule_parameter : (Var.t * Scopelang.Ast.typ Utils.Pos.marked) option;rule_exception_to_rules : RuleSet.t Utils.Pos.marked;
}Source
type meta_assertion = | FixedBy of reference_typ Utils.Pos.marked| VariesWith of unit * variation_typ Utils.Pos.marked option
Source
type scope_def = {scope_def_rules : rule RuleMap.t;scope_def_typ : Scopelang.Ast.typ Utils.Pos.marked;scope_def_is_condition : bool;scope_def_io : Scopelang.Ast.io;scope_def_label_groups : RuleSet.t LabelMap.t;
}Source
type scope = {scope_vars : var_or_states ScopeVarMap.t;scope_sub_scopes : Scopelang.Ast.ScopeName.t Scopelang.Ast.SubScopeMap.t;scope_uid : Scopelang.Ast.ScopeName.t;scope_defs : scope_def ScopeDefMap.t;scope_assertions : assertion list;scope_meta_assertions : meta_assertion list;
}Source
type program = {program_scopes : scope Scopelang.Ast.ScopeMap.t;program_enums : Scopelang.Ast.enum_ctx;program_structs : Scopelang.Ast.struct_ctx;
}Helpers
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page