Scopelang.Ast
Abstract syntax tree of the scope language
type location = Shared_ast.scopelang Shared_ast.glocation
type 'm expr = ( Shared_ast.scopelang, 'm ) Shared_ast.gexpr
val locations_used : 'm expr -> LocationSet.t
type 'm rule =
| Definition of location Catala_utils.Mark.pos
* Shared_ast.typ
* Desugared.Ast.io
* 'm expr |
| Assertion of 'm expr |
| Call of Shared_ast.ScopeName.t * Shared_ast.SubScopeName.t * 'm Shared_ast.mark |
type 'm scope_decl = {
scope_decl_name : Shared_ast.ScopeName.t; |
scope_sig : (Shared_ast.typ * Desugared.Ast.io) Shared_ast.ScopeVar.Map.t; |
scope_decl_rules : 'm rule list; |
scope_mark : 'm Shared_ast.mark; |
scope_options : Desugared.Ast.catala_option Catala_utils.Mark.pos list; |
}
type 'm program = {
program_scopes : 'm scope_decl Shared_ast.ScopeName.Map.t; |
program_topdefs : ('m expr * Shared_ast.typ) Shared_ast.TopdefName.Map.t; |
program_ctx : Shared_ast.decl_ctx; |
}
val type_program : 'm program -> Shared_ast.typed program