From 70f4e46dcc344c3a8b72d114aa5d072342447c2b Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Thu, 11 Feb 2021 18:48:59 +0100 Subject: [PATCH] Add some .mli files Generated: these would need cleanup, formatting, insertion of the doc comments, and removal of non-shared values. --- src/catala/dcalc/ast.mli | 288 + src/catala/dcalc/interpreter.mli | 18 + src/catala/dcalc/print.mli | 22 + src/catala/dcalc/typing.mli | 46 + src/catala/desugared/ast.mli | 281 + src/catala/desugared/dependency.mli | 185 + src/catala/desugared/desugared_to_scope.mli | 18 + src/catala/lcalc/ast.mli | 103 + src/catala/lcalc/compile_with_exceptions.mli | 17 + src/catala/lcalc/to_ocaml.mli | 30 + src/catala/literate/html.mli | 24 + src/catala/literate/latex.mli | 16 + src/catala/scopelang/ast.mli | 551 + src/catala/scopelang/dependency.mli | 240 + src/catala/scopelang/print.mli | 8 + src/catala/scopelang/scope_to_dcalc.mli | 66 + src/catala/surface/ast.mli | 12569 +++++++++++++++++ src/catala/surface/desugaring.mli | 75 + src/catala/surface/fill_positions.mli | 2 + src/catala/surface/lexer.mli | 221 + src/catala/surface/lexer_en.mli | 225 + src/catala/surface/lexer_fr.mli | 224 + src/catala/surface/name_resolution.mli | 97 + src/catala/surface/parse_utils.mli | 1 + src/catala/surface/parser_driver.mli | 33 + src/catala/surface/parser_errors.mli | 1 + src/catala/surface/print.mli | 2 + src/catala/utils/cli.mli | 49 + src/catala/utils/errors.mli | 11 + 29 files changed, 15423 insertions(+) create mode 100644 src/catala/dcalc/ast.mli create mode 100644 src/catala/dcalc/interpreter.mli create mode 100644 src/catala/dcalc/print.mli create mode 100644 src/catala/dcalc/typing.mli create mode 100644 src/catala/desugared/ast.mli create mode 100644 src/catala/desugared/dependency.mli create mode 100644 src/catala/desugared/desugared_to_scope.mli create mode 100644 src/catala/lcalc/ast.mli create mode 100644 src/catala/lcalc/compile_with_exceptions.mli create mode 100644 src/catala/lcalc/to_ocaml.mli create mode 100644 src/catala/literate/html.mli create mode 100644 src/catala/literate/latex.mli create mode 100644 src/catala/scopelang/ast.mli create mode 100644 src/catala/scopelang/dependency.mli create mode 100644 src/catala/scopelang/print.mli create mode 100644 src/catala/scopelang/scope_to_dcalc.mli create mode 100644 src/catala/surface/ast.mli create mode 100644 src/catala/surface/desugaring.mli create mode 100644 src/catala/surface/fill_positions.mli create mode 100644 src/catala/surface/lexer.mli create mode 100644 src/catala/surface/lexer_en.mli create mode 100644 src/catala/surface/lexer_fr.mli create mode 100644 src/catala/surface/name_resolution.mli create mode 100644 src/catala/surface/parse_utils.mli create mode 100644 src/catala/surface/parser_driver.mli create mode 100644 src/catala/surface/parser_errors.mli create mode 100644 src/catala/surface/print.mli create mode 100644 src/catala/utils/cli.mli create mode 100644 src/catala/utils/errors.mli diff --git a/src/catala/dcalc/ast.mli b/src/catala/dcalc/ast.mli new file mode 100644 index 00000000..2082cce8 --- /dev/null +++ b/src/catala/dcalc/ast.mli @@ -0,0 +1,288 @@ +module ScopeName : + sig + type t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module StructName : + sig + type t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module StructFieldName : + sig + type t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module StructMap : + sig + type key = StructName.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +module EnumName : + sig + type t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module EnumConstructor : + sig + type t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module EnumMap : + sig + type key = EnumName.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +type typ_lit = TBool | TUnit | TInt | TRat | TMoney | TDate | TDuration +type typ = + TLit of typ_lit + | TTuple of typ Utils.Pos.marked list * StructName.t option + | TEnum of typ Utils.Pos.marked list * EnumName.t + | TArrow of typ Utils.Pos.marked * typ Utils.Pos.marked + | TArray of typ Utils.Pos.marked + | TAny +type date = CalendarLib.Date.t +type duration = CalendarLib.Date.Period.t +type lit = + LBool of bool + | LEmptyError + | LInt of Z.t + | LRat of Q.t + | LMoney of Z.t + | LUnit + | LDate of date + | LDuration of duration +type op_kind = KInt | KRat | KMoney | KDate | KDuration +type ternop = Fold +type binop = + And + | Or + | Add of op_kind + | Sub of op_kind + | Mult of op_kind + | Div of op_kind + | Lt of op_kind + | Lte of op_kind + | Gt of op_kind + | Gte of op_kind + | Eq + | Neq + | Map + | Filter +type log_entry = VarDef | BeginCall | EndCall | PosRecordIfTrueBool +type unop = + Not + | Minus of op_kind + | ErrorOnEmpty + | Log of log_entry * Utils.Uid.MarkedString.info list + | Length + | IntToRat + | GetDay + | GetMonth + | GetYear +type operator = Ternop of ternop | Binop of binop | Unop of unop +type expr = + EVar of expr Bindlib.var Utils.Pos.marked + | ETuple of expr Utils.Pos.marked list * StructName.t option + | ETupleAccess of expr Utils.Pos.marked * int * StructName.t option * + typ Utils.Pos.marked list + | EInj of expr Utils.Pos.marked * int * EnumName.t * + typ Utils.Pos.marked list + | EMatch of expr Utils.Pos.marked * expr Utils.Pos.marked list * EnumName.t + | EArray of expr Utils.Pos.marked list + | ELit of lit + | EAbs of Utils.Pos.t * (expr, expr Utils.Pos.marked) Bindlib.mbinder * + typ Utils.Pos.marked list + | EApp of expr Utils.Pos.marked * expr Utils.Pos.marked list + | EAssert of expr Utils.Pos.marked + | EOp of 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 +type struct_ctx = (StructFieldName.t * typ Utils.Pos.marked) list StructMap.t +type enum_ctx = (EnumConstructor.t * typ Utils.Pos.marked) list EnumMap.t +type decl_ctx = { ctx_enums : enum_ctx; ctx_structs : struct_ctx; } +module Var : + sig + type t = expr Bindlib.var + val make : string Utils.Pos.marked -> t + val compare : 'a Bindlib.var -> 'b Bindlib.var -> int + end +module VarMap : + sig + type key = Var.t + type 'a t = 'a Stdlib__map.Make(Var).t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +type vars = expr Bindlib.mvar +val make_var : Var.t Utils.Pos.marked -> expr Utils.Pos.marked Bindlib.box +val 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 +val make_app : + expr Utils.Pos.marked Bindlib.box -> + expr Utils.Pos.marked Bindlib.box list -> + Utils.Pos.t -> expr Utils.Pos.marked Bindlib.box +val 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 +val make_multiple_let_in : + Var.t array -> + typ Utils.Pos.marked list -> + expr Utils.Pos.marked list Bindlib.box -> + expr Utils.Pos.marked Bindlib.box -> expr Utils.Pos.marked Bindlib.box +type binder = (expr, expr Utils.Pos.marked) Bindlib.binder +type program = { + decl_ctx : decl_ctx; + scopes : (Var.t * expr Utils.Pos.marked) list; +} diff --git a/src/catala/dcalc/interpreter.mli b/src/catala/dcalc/interpreter.mli new file mode 100644 index 00000000..602e9ee8 --- /dev/null +++ b/src/catala/dcalc/interpreter.mli @@ -0,0 +1,18 @@ +module A = Ast +val is_empty_error : A.expr Utils.Pos.marked -> bool +val empty_thunked_term : Ast.expr Utils.Pos.marked +val type_eq : A.typ Utils.Pos.marked -> A.typ Utils.Pos.marked -> bool +val log_indent : int ref +val compare_periods : + CalendarLib.Date.Period.t Utils.Pos.marked -> + CalendarLib.Date.Period.t Utils.Pos.marked -> int +val evaluate_operator : + Ast.decl_ctx -> + A.operator Utils.Pos.marked -> + A.expr Utils.Pos.marked list -> A.expr Utils.Pos.marked +val evaluate_expr : + Ast.decl_ctx -> A.expr Utils.Pos.marked -> A.expr Utils.Pos.marked +val interpret_program : + Ast.decl_ctx -> + Ast.expr Utils.Pos.marked -> + (Utils.Uid.MarkedString.info * Ast.expr Utils.Pos.marked) list diff --git a/src/catala/dcalc/print.mli b/src/catala/dcalc/print.mli new file mode 100644 index 00000000..a4fa6ec3 --- /dev/null +++ b/src/catala/dcalc/print.mli @@ -0,0 +1,22 @@ +val typ_needs_parens : Ast.typ Utils.Pos.marked -> bool +val is_uppercase : CamomileLibraryDefault.Camomile.UChar.t -> bool +val begins_with_uppercase : string -> bool +val format_uid_list : + Format.formatter -> Utils.Uid.MarkedString.info list -> unit +val format_tlit : Format.formatter -> Ast.typ_lit -> unit +val format_typ : + Ast.decl_ctx -> + Format.formatter -> Ast.typ Utils.Pos.marked -> unit +val format_lit : Format.formatter -> Ast.lit Utils.Pos.marked -> unit +val format_op_kind : Format.formatter -> Ast.op_kind -> unit +val format_binop : + Format.formatter -> Ast.binop Utils.Pos.marked -> unit +val format_ternop : + Format.formatter -> Ast.ternop Utils.Pos.marked -> unit +val format_log_entry : Format.formatter -> Ast.log_entry -> unit +val format_unop : Format.formatter -> Ast.unop Utils.Pos.marked -> unit +val needs_parens : Ast.expr Utils.Pos.marked -> bool +val format_var : Format.formatter -> Ast.Var.t -> unit +val format_expr : + Ast.decl_ctx -> + Format.formatter -> Ast.expr Utils.Pos.marked -> unit diff --git a/src/catala/dcalc/typing.mli b/src/catala/dcalc/typing.mli new file mode 100644 index 00000000..388acf0a --- /dev/null +++ b/src/catala/dcalc/typing.mli @@ -0,0 +1,46 @@ +module A = Ast +module Any : + sig + type t + type info = unit + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +type typ = + TLit of A.typ_lit + | TArrow of typ Utils.Pos.marked UnionFind.elem * + typ Utils.Pos.marked UnionFind.elem + | TTuple of typ Utils.Pos.marked UnionFind.elem list * + Ast.StructName.t option + | TEnum of typ Utils.Pos.marked UnionFind.elem list * Ast.EnumName.t + | TArray of typ Utils.Pos.marked UnionFind.elem + | TAny of Any.t +val typ_needs_parens : typ Utils.Pos.marked UnionFind.elem -> bool +val format_typ : + Ast.decl_ctx -> + Format.formatter -> typ Utils.Pos.marked UnionFind.elem -> unit +val unify : + Ast.decl_ctx -> + typ Utils.Pos.marked UnionFind.elem -> + typ Utils.Pos.marked UnionFind.elem -> unit +val op_type : + A.operator Utils.Pos.marked -> typ Utils.Pos.marked UnionFind.elem +val ast_to_typ : A.typ -> typ +val typ_to_ast : + typ Utils.Pos.marked UnionFind.elem -> A.typ Utils.Pos.marked +type env = typ Utils.Pos.marked UnionFind.elem A.VarMap.t +val typecheck_expr_bottom_up : + Ast.decl_ctx -> + env -> A.expr Utils.Pos.marked -> typ Utils.Pos.marked UnionFind.elem +val typecheck_expr_top_down : + Ast.decl_ctx -> + env -> + A.expr Utils.Pos.marked -> typ Utils.Pos.marked UnionFind.elem -> unit +val infer_type : + Ast.decl_ctx -> A.expr Utils.Pos.marked -> A.typ Utils.Pos.marked +val check_type : + Ast.decl_ctx -> + A.expr Utils.Pos.marked -> A.typ Utils.Pos.marked -> unit diff --git a/src/catala/desugared/ast.mli b/src/catala/desugared/ast.mli new file mode 100644 index 00000000..09e7068f --- /dev/null +++ b/src/catala/desugared/ast.mli @@ -0,0 +1,281 @@ +module IdentMap : + sig + type key = String.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +module RuleName : + sig + type t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module RuleMap : + sig + type key = RuleName.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +module RuleSet : + sig + type elt = RuleName.t + type t + val empty : t + val is_empty : t -> bool + val mem : elt -> t -> bool + val add : elt -> t -> t + val singleton : elt -> t + val remove : elt -> t -> t + val union : t -> t -> t + val inter : t -> t -> t + val disjoint : t -> t -> bool + val diff : t -> t -> t + val compare : t -> t -> int + val equal : t -> t -> bool + val subset : t -> t -> bool + val iter : (elt -> unit) -> t -> unit + val map : (elt -> elt) -> t -> t + val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all : (elt -> bool) -> t -> bool + val exists : (elt -> bool) -> t -> bool + val filter : (elt -> bool) -> t -> t + val filter_map : (elt -> elt option) -> t -> t + val partition : (elt -> bool) -> t -> t * t + val cardinal : t -> int + val elements : t -> elt list + val min_elt : t -> elt + val min_elt_opt : t -> elt option + val max_elt : t -> elt + val max_elt_opt : t -> elt option + val choose : t -> elt + val choose_opt : t -> elt option + val split : elt -> t -> t * bool * t + val find : elt -> t -> elt + val find_opt : elt -> t -> elt option + val find_first : (elt -> bool) -> t -> elt + val find_first_opt : (elt -> bool) -> t -> elt option + val find_last : (elt -> bool) -> t -> elt + val find_last_opt : (elt -> bool) -> t -> elt option + val of_list : elt list -> t + val to_seq_from : elt -> t -> elt Seq.t + val to_seq : t -> elt Seq.t + val add_seq : elt Seq.t -> t -> t + val of_seq : elt Seq.t -> t + end +module ScopeDef : + sig + type t = + Var of Scopelang.Ast.ScopeVar.t + | SubScopeVar of Scopelang.Ast.SubScopeName.t * + Scopelang.Ast.ScopeVar.t + val compare : t -> t -> int + val get_position : t -> Utils.Pos.t + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module ScopeDefMap : + sig + type key = ScopeDef.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +module ScopeDefSet : + sig + type elt = ScopeDef.t + type t + val empty : t + val is_empty : t -> bool + val mem : elt -> t -> bool + val add : elt -> t -> t + val singleton : elt -> t + val remove : elt -> t -> t + val union : t -> t -> t + val inter : t -> t -> t + val disjoint : t -> t -> bool + val diff : t -> t -> t + val compare : t -> t -> int + val equal : t -> t -> bool + val subset : t -> t -> bool + val iter : (elt -> unit) -> t -> unit + val map : (elt -> elt) -> t -> t + val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all : (elt -> bool) -> t -> bool + val exists : (elt -> bool) -> t -> bool + val filter : (elt -> bool) -> t -> t + val filter_map : (elt -> elt option) -> t -> t + val partition : (elt -> bool) -> t -> t * t + val cardinal : t -> int + val elements : t -> elt list + val min_elt : t -> elt + val min_elt_opt : t -> elt option + val max_elt : t -> elt + val max_elt_opt : t -> elt option + val choose : t -> elt + val choose_opt : t -> elt option + val split : elt -> t -> t * bool * t + val find : elt -> t -> elt + val find_opt : elt -> t -> elt option + val find_first : (elt -> bool) -> t -> elt + val find_first_opt : (elt -> bool) -> t -> elt option + val find_last : (elt -> bool) -> t -> elt + val find_last_opt : (elt -> bool) -> t -> elt option + val of_list : elt list -> t + val to_seq_from : elt -> t -> elt Seq.t + val to_seq : t -> elt Seq.t + val add_seq : elt Seq.t -> t -> t + val of_seq : elt Seq.t -> t + end +type rule = { + just : Scopelang.Ast.expr Utils.Pos.marked Bindlib.box; + cons : Scopelang.Ast.expr Utils.Pos.marked Bindlib.box; + parameter : + (Scopelang.Ast.Var.t * Scopelang.Ast.typ Utils.Pos.marked) option; + exception_to_rule : RuleName.t Utils.Pos.marked option; +} +val empty_rule : + Utils.Pos.t -> Scopelang.Ast.typ Utils.Pos.marked option -> rule +val always_false_rule : + Utils.Pos.t -> Scopelang.Ast.typ Utils.Pos.marked option -> rule +type assertion = Scopelang.Ast.expr Utils.Pos.marked Bindlib.box +type variation_typ = Increasing | Decreasing +type reference_typ = Decree | Law +type meta_assertion = + FixedBy of reference_typ Utils.Pos.marked + | VariesWith of unit * variation_typ Utils.Pos.marked option +type scope = { + scope_vars : Scopelang.Ast.ScopeVarSet.t; + scope_sub_scopes : Scopelang.Ast.ScopeName.t Scopelang.Ast.SubScopeMap.t; + scope_uid : Scopelang.Ast.ScopeName.t; + scope_defs : + (rule RuleMap.t * Scopelang.Ast.typ Utils.Pos.marked * bool) + ScopeDefMap.t; + scope_assertions : assertion list; + scope_meta_assertions : meta_assertion list; +} +type program = { + program_scopes : scope Scopelang.Ast.ScopeMap.t; + program_enums : Scopelang.Ast.enum_ctx; + program_structs : Scopelang.Ast.struct_ctx; +} +val free_variables : rule RuleMap.t -> Utils.Pos.t ScopeDefMap.t diff --git a/src/catala/desugared/dependency.mli b/src/catala/desugared/dependency.mli new file mode 100644 index 00000000..2ef00438 --- /dev/null +++ b/src/catala/desugared/dependency.mli @@ -0,0 +1,185 @@ +module Vertex : + sig + type t = + Var of Scopelang.Ast.ScopeVar.t + | SubScope of Scopelang.Ast.SubScopeName.t + val hash : t -> int + val compare : 'a -> 'a -> int + val equal : t -> t -> bool + val format_t : Format.formatter -> t -> unit + end +module Edge : + sig + type t = Utils.Pos.t + val compare : 'a -> 'a -> int + val default : Utils.Pos.t + end +module ScopeDependencies : + sig + type t = + Graph__Persistent.Digraph.ConcreteBidirectionalLabeled(Vertex)(Edge).t + module V : + sig + type t = Vertex.t + val compare : t -> t -> int + val hash : t -> int + val equal : t -> t -> bool + type label = Vertex.t + val create : label -> t + val label : t -> label + end + type vertex = V.t + module E : + sig + type t = Vertex.t * Edge.t * Vertex.t + val compare : t -> t -> int + type nonrec vertex = vertex + val src : t -> vertex + val dst : t -> vertex + type label = Edge.t + val create : vertex -> label -> vertex -> t + val label : t -> label + end + type edge = E.t + val is_directed : bool + val is_empty : t -> bool + val nb_vertex : t -> int + val nb_edges : t -> int + val out_degree : t -> vertex -> int + val in_degree : t -> vertex -> int + val mem_vertex : t -> vertex -> bool + val mem_edge : t -> vertex -> vertex -> bool + val mem_edge_e : t -> edge -> bool + val find_edge : t -> vertex -> vertex -> edge + val find_all_edges : t -> vertex -> vertex -> edge list + val succ : t -> vertex -> vertex list + val pred : t -> vertex -> vertex list + val succ_e : t -> vertex -> edge list + val pred_e : t -> vertex -> edge list + val iter_vertex : (vertex -> unit) -> t -> unit + val fold_vertex : (vertex -> 'a -> 'a) -> t -> 'a -> 'a + val iter_edges : (vertex -> vertex -> unit) -> t -> unit + val fold_edges : (vertex -> vertex -> 'a -> 'a) -> t -> 'a -> 'a + val iter_edges_e : (edge -> unit) -> t -> unit + val fold_edges_e : (edge -> 'a -> 'a) -> t -> 'a -> 'a + val map_vertex : (vertex -> vertex) -> t -> t + val iter_succ : (vertex -> unit) -> t -> vertex -> unit + val iter_pred : (vertex -> unit) -> t -> vertex -> unit + val fold_succ : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val fold_pred : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val iter_succ_e : (edge -> unit) -> t -> vertex -> unit + val fold_succ_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val iter_pred_e : (edge -> unit) -> t -> vertex -> unit + val fold_pred_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val empty : t + val add_vertex : t -> vertex -> t + val remove_vertex : t -> vertex -> t + val add_edge : t -> vertex -> vertex -> t + val add_edge_e : t -> edge -> t + val remove_edge : t -> vertex -> vertex -> t + val remove_edge_e : t -> edge -> t + end +module TopologicalTraversal : + sig + val fold : + (ScopeDependencies.V.t -> 'a -> 'a) -> ScopeDependencies.t -> 'a -> 'a + val iter : (ScopeDependencies.V.t -> unit) -> ScopeDependencies.t -> unit + end +module SCC : + sig + val scc : ScopeDependencies.t -> int * (ScopeDependencies.V.t -> int) + val scc_array : ScopeDependencies.t -> ScopeDependencies.V.t list array + val scc_list : ScopeDependencies.t -> ScopeDependencies.V.t list list + end +val correct_computation_ordering : ScopeDependencies.t -> Vertex.t list +val check_for_cycle : Ast.scope -> ScopeDependencies.t -> unit +val build_scope_dependencies : Ast.scope -> ScopeDependencies.t +module ExceptionVertex : + sig + type t = Desugared__Ast.RuleName.t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + val equal : t -> t -> bool + end +module ExceptionsDependencies : + sig + type t = + Graph__Persistent.Digraph.ConcreteBidirectionalLabeled(ExceptionVertex)(Edge).t + module V : + sig + type t = ExceptionVertex.t + val compare : t -> t -> int + val hash : t -> int + val equal : t -> t -> bool + type label = ExceptionVertex.t + val create : label -> t + val label : t -> label + end + type vertex = V.t + module E : + sig + type t = ExceptionVertex.t * Edge.t * ExceptionVertex.t + val compare : t -> t -> int + type nonrec vertex = vertex + val src : t -> vertex + val dst : t -> vertex + type label = Edge.t + val create : vertex -> label -> vertex -> t + val label : t -> label + end + type edge = E.t + val is_directed : bool + val is_empty : t -> bool + val nb_vertex : t -> int + val nb_edges : t -> int + val out_degree : t -> vertex -> int + val in_degree : t -> vertex -> int + val mem_vertex : t -> vertex -> bool + val mem_edge : t -> vertex -> vertex -> bool + val mem_edge_e : t -> edge -> bool + val find_edge : t -> vertex -> vertex -> edge + val find_all_edges : t -> vertex -> vertex -> edge list + val succ : t -> vertex -> vertex list + val pred : t -> vertex -> vertex list + val succ_e : t -> vertex -> edge list + val pred_e : t -> vertex -> edge list + val iter_vertex : (vertex -> unit) -> t -> unit + val fold_vertex : (vertex -> 'a -> 'a) -> t -> 'a -> 'a + val iter_edges : (vertex -> vertex -> unit) -> t -> unit + val fold_edges : (vertex -> vertex -> 'a -> 'a) -> t -> 'a -> 'a + val iter_edges_e : (edge -> unit) -> t -> unit + val fold_edges_e : (edge -> 'a -> 'a) -> t -> 'a -> 'a + val map_vertex : (vertex -> vertex) -> t -> t + val iter_succ : (vertex -> unit) -> t -> vertex -> unit + val iter_pred : (vertex -> unit) -> t -> vertex -> unit + val fold_succ : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val fold_pred : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val iter_succ_e : (edge -> unit) -> t -> vertex -> unit + val fold_succ_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val iter_pred_e : (edge -> unit) -> t -> vertex -> unit + val fold_pred_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val empty : t + val add_vertex : t -> vertex -> t + val remove_vertex : t -> vertex -> t + val add_edge : t -> vertex -> vertex -> t + val add_edge_e : t -> edge -> t + val remove_edge : t -> vertex -> vertex -> t + val remove_edge_e : t -> edge -> t + end +module ExceptionsSCC : + sig + val scc : + ExceptionsDependencies.t -> int * (ExceptionsDependencies.V.t -> int) + val scc_array : + ExceptionsDependencies.t -> ExceptionsDependencies.V.t list array + val scc_list : + ExceptionsDependencies.t -> ExceptionsDependencies.V.t list list + end +val build_exceptions_graph : + Ast.rule Ast.RuleMap.t -> + Ast.ScopeDef.t -> ExceptionsDependencies.t +val check_for_exception_cycle : ExceptionsDependencies.t -> unit diff --git a/src/catala/desugared/desugared_to_scope.mli b/src/catala/desugared/desugared_to_scope.mli new file mode 100644 index 00000000..68a059a3 --- /dev/null +++ b/src/catala/desugared/desugared_to_scope.mli @@ -0,0 +1,18 @@ +type rule_tree = + Leaf of Ast.rule + | Node of rule_tree list * Ast.rule +val def_map_to_tree : + Ast.ScopeDef.t -> + Ast.rule Ast.RuleMap.t -> rule_tree list +val rule_tree_to_expr : + toplevel:bool -> + Utils.Pos.t -> + Scopelang.Ast.Var.t option -> + rule_tree -> Scopelang.Ast.expr Utils.Pos.marked Bindlib.box +val translate_def : + Ast.ScopeDef.t -> + Ast.rule Ast.RuleMap.t -> + Scopelang.Ast.typ Utils.Pos.marked -> + bool -> Scopelang.Ast.expr Utils.Pos.marked +val translate_scope : Ast.scope -> Scopelang.Ast.scope_decl +val translate_program : Ast.program -> Scopelang.Ast.program diff --git a/src/catala/lcalc/ast.mli b/src/catala/lcalc/ast.mli new file mode 100644 index 00000000..b162ea9c --- /dev/null +++ b/src/catala/lcalc/ast.mli @@ -0,0 +1,103 @@ +module D = Dcalc.Ast +type lit = + LBool of bool + | LInt of Z.t + | LRat of Q.t + | LMoney of Z.t + | LUnit + | LDate of D.date + | LDuration of D.duration +type except = ConflictError | EmptyError | Crash +type expr = + EVar of expr Bindlib.var Utils.Pos.marked + | ETuple of expr Utils.Pos.marked list * D.StructName.t option + | ETupleAccess of expr Utils.Pos.marked * int * D.StructName.t option * + D.typ Utils.Pos.marked list + | EInj of expr Utils.Pos.marked * int * D.EnumName.t * + D.typ Utils.Pos.marked list + | EMatch of expr Utils.Pos.marked * expr Utils.Pos.marked list * + D.EnumName.t + | EArray of expr Utils.Pos.marked list + | ELit of lit + | EAbs of Utils.Pos.t * (expr, expr Utils.Pos.marked) Bindlib.mbinder * + D.typ Utils.Pos.marked list + | EApp of expr Utils.Pos.marked * expr Utils.Pos.marked list + | EAssert of expr Utils.Pos.marked + | EOp of D.operator + | EIfThenElse of expr Utils.Pos.marked * expr Utils.Pos.marked * + expr Utils.Pos.marked + | ERaise of except + | ECatch of expr Utils.Pos.marked * except * expr Utils.Pos.marked +module Var : + sig + type t = expr Bindlib.var + val make : string Utils.Pos.marked -> t + val compare : 'a Bindlib.var -> 'b Bindlib.var -> int + end +module VarMap : + sig + type key = Var.t + type 'a t = 'a Stdlib__map.Make(Var).t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +type vars = expr Bindlib.mvar +val make_var : Var.t Utils.Pos.marked -> expr Utils.Pos.marked Bindlib.box +val make_abs : + vars -> + expr Utils.Pos.marked Bindlib.box -> + Utils.Pos.t -> + D.typ Utils.Pos.marked list -> + Utils.Pos.t -> expr Utils.Pos.marked Bindlib.box +val make_app : + expr Utils.Pos.marked Bindlib.box -> + expr Utils.Pos.marked Bindlib.box list -> + Utils.Pos.t -> expr Utils.Pos.marked Bindlib.box +val make_let_in : + Var.t -> + D.typ Utils.Pos.marked -> + expr Utils.Pos.marked Bindlib.box -> + expr Utils.Pos.marked Bindlib.box -> expr Utils.Pos.marked Bindlib.box +type binder = (expr, expr Utils.Pos.marked) Bindlib.binder +type program = { + decl_ctx : D.decl_ctx; + scopes : (Var.t * expr Utils.Pos.marked) list; +} diff --git a/src/catala/lcalc/compile_with_exceptions.mli b/src/catala/lcalc/compile_with_exceptions.mli new file mode 100644 index 00000000..9a70a6d6 --- /dev/null +++ b/src/catala/lcalc/compile_with_exceptions.mli @@ -0,0 +1,17 @@ +module D = Dcalc.Ast +module A = Ast +type ctx = A.expr Utils.Pos.marked Bindlib.box D.VarMap.t +val handle_default : Utils.Pos.t -> A.expr Utils.Pos.marked Bindlib.box +val translate_lit : D.lit -> A.expr +val thunk_expr : + A.expr Utils.Pos.marked Bindlib.box -> + Utils.Pos.t -> A.expr Utils.Pos.marked Bindlib.box +val translate_default : + ctx -> + D.expr Utils.Pos.marked list -> + D.expr Utils.Pos.marked -> + D.expr Utils.Pos.marked -> + Utils.Pos.t -> A.expr Utils.Pos.marked Bindlib.box +val translate_expr : + ctx -> D.expr Utils.Pos.marked -> A.expr Utils.Pos.marked Bindlib.box +val translate_program : D.program -> A.program diff --git a/src/catala/lcalc/to_ocaml.mli b/src/catala/lcalc/to_ocaml.mli new file mode 100644 index 00000000..5dff1d48 --- /dev/null +++ b/src/catala/lcalc/to_ocaml.mli @@ -0,0 +1,30 @@ +val format_lit : Format.formatter -> Ast.lit Utils.Pos.marked -> unit +val format_op_kind : Format.formatter -> Dcalc.Ast.op_kind -> unit +val format_log_entry : Format.formatter -> Dcalc.Ast.log_entry -> unit +val format_binop : + Format.formatter -> Dcalc.Ast.binop Utils.Pos.marked -> unit +val format_ternop : + Format.formatter -> Dcalc.Ast.ternop Utils.Pos.marked -> unit +val format_unop : Format.formatter -> Dcalc.Ast.unop Utils.Pos.marked -> unit +val to_ascii : string -> string +val to_lowercase : string -> string +val format_struct_name : Format.formatter -> Dcalc.Ast.StructName.t -> unit +val format_struct_field_name : + Format.formatter -> Dcalc.Ast.StructFieldName.t -> unit +val format_enum_name : Format.formatter -> Dcalc.Ast.EnumName.t -> unit +val format_enum_cons_name : + Format.formatter -> Dcalc.Ast.EnumConstructor.t -> unit +val typ_needs_parens : Dcalc.Ast.typ Utils.Pos.marked -> bool +val format_typ : Format.formatter -> Dcalc.Ast.typ Utils.Pos.marked -> unit +val format_var : Format.formatter -> Ast.Var.t -> unit +val needs_parens : Ast.expr Utils.Pos.marked -> bool +val format_exception : Format.formatter -> Ast.except -> unit +val format_expr : + Dcalc.Ast.decl_ctx -> + Format.formatter -> Ast.expr Utils.Pos.marked -> unit +val format_ctx : + Scopelang.Dependency.TVertex.t list -> + Format.formatter -> Ast.D.decl_ctx -> unit +val format_program : + Format.formatter -> + Ast.program -> Scopelang.Dependency.TVertex.t list -> unit diff --git a/src/catala/literate/html.mli b/src/catala/literate/html.mli new file mode 100644 index 00000000..086f44df --- /dev/null +++ b/src/catala/literate/html.mli @@ -0,0 +1,24 @@ +module A = Surface.Ast +module P = Printf +module R = Re.Pcre +module C = Utils.Cli +val pre_html : string -> string +val raise_failed_pygments : string -> int -> 'a +val wrap_html : + string list -> + string option -> + Utils.Cli.backend_lang -> + Format.formatter -> (Format.formatter -> unit) -> unit +val pygmentize_code : + string Utils.Pos.marked -> C.backend_lang -> string option -> string +val law_article_item_to_html : + string option -> + C.backend_lang -> Format.formatter -> A.law_article_item -> unit +val law_structure_to_html : + string option -> + C.backend_lang -> Format.formatter -> A.law_structure -> unit +val program_item_to_html : + string option -> + C.backend_lang -> Format.formatter -> A.program_item -> unit +val ast_to_html : + string option -> C.backend_lang -> Format.formatter -> A.program -> unit diff --git a/src/catala/literate/latex.mli b/src/catala/literate/latex.mli new file mode 100644 index 00000000..946bd5d4 --- /dev/null +++ b/src/catala/literate/latex.mli @@ -0,0 +1,16 @@ +module A = Surface.Ast +module R = Re.Pcre +module C = Utils.Cli +val pre_latexify : string -> string +val wrap_latex : + string list -> + string option -> + C.backend_lang -> Format.formatter -> (Format.formatter -> unit) -> unit +val math_syms_replace : string -> string +val law_article_item_to_latex : + C.backend_lang -> Format.formatter -> A.law_article_item -> unit +val law_structure_to_latex : + C.backend_lang -> Format.formatter -> A.law_structure -> unit +val program_item_to_latex : + C.backend_lang -> Format.formatter -> A.program_item -> unit +val ast_to_latex : C.backend_lang -> Format.formatter -> A.program -> unit diff --git a/src/catala/scopelang/ast.mli b/src/catala/scopelang/ast.mli new file mode 100644 index 00000000..3a7d7bd3 --- /dev/null +++ b/src/catala/scopelang/ast.mli @@ -0,0 +1,551 @@ +module ScopeName = Dcalc.Ast.ScopeName +module ScopeNameSet : + sig + type elt = ScopeName.t + type t + val empty : t + val is_empty : t -> bool + val mem : elt -> t -> bool + val add : elt -> t -> t + val singleton : elt -> t + val remove : elt -> t -> t + val union : t -> t -> t + val inter : t -> t -> t + val disjoint : t -> t -> bool + val diff : t -> t -> t + val compare : t -> t -> int + val equal : t -> t -> bool + val subset : t -> t -> bool + val iter : (elt -> unit) -> t -> unit + val map : (elt -> elt) -> t -> t + val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all : (elt -> bool) -> t -> bool + val exists : (elt -> bool) -> t -> bool + val filter : (elt -> bool) -> t -> t + val filter_map : (elt -> elt option) -> t -> t + val partition : (elt -> bool) -> t -> t * t + val cardinal : t -> int + val elements : t -> elt list + val min_elt : t -> elt + val min_elt_opt : t -> elt option + val max_elt : t -> elt + val max_elt_opt : t -> elt option + val choose : t -> elt + val choose_opt : t -> elt option + val split : elt -> t -> t * bool * t + val find : elt -> t -> elt + val find_opt : elt -> t -> elt option + val find_first : (elt -> bool) -> t -> elt + val find_first_opt : (elt -> bool) -> t -> elt option + val find_last : (elt -> bool) -> t -> elt + val find_last_opt : (elt -> bool) -> t -> elt option + val of_list : elt list -> t + val to_seq_from : elt -> t -> elt Seq.t + val to_seq : t -> elt Seq.t + val add_seq : elt Seq.t -> t -> t + val of_seq : elt Seq.t -> t + end +module ScopeMap : + sig + type key = ScopeName.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +module SubScopeName : + sig + type t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module SubScopeNameSet : + sig + type elt = SubScopeName.t + type t + val empty : t + val is_empty : t -> bool + val mem : elt -> t -> bool + val add : elt -> t -> t + val singleton : elt -> t + val remove : elt -> t -> t + val union : t -> t -> t + val inter : t -> t -> t + val disjoint : t -> t -> bool + val diff : t -> t -> t + val compare : t -> t -> int + val equal : t -> t -> bool + val subset : t -> t -> bool + val iter : (elt -> unit) -> t -> unit + val map : (elt -> elt) -> t -> t + val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all : (elt -> bool) -> t -> bool + val exists : (elt -> bool) -> t -> bool + val filter : (elt -> bool) -> t -> t + val filter_map : (elt -> elt option) -> t -> t + val partition : (elt -> bool) -> t -> t * t + val cardinal : t -> int + val elements : t -> elt list + val min_elt : t -> elt + val min_elt_opt : t -> elt option + val max_elt : t -> elt + val max_elt_opt : t -> elt option + val choose : t -> elt + val choose_opt : t -> elt option + val split : elt -> t -> t * bool * t + val find : elt -> t -> elt + val find_opt : elt -> t -> elt option + val find_first : (elt -> bool) -> t -> elt + val find_first_opt : (elt -> bool) -> t -> elt option + val find_last : (elt -> bool) -> t -> elt + val find_last_opt : (elt -> bool) -> t -> elt option + val of_list : elt list -> t + val to_seq_from : elt -> t -> elt Seq.t + val to_seq : t -> elt Seq.t + val add_seq : elt Seq.t -> t -> t + val of_seq : elt Seq.t -> t + end +module SubScopeMap : + sig + type key = SubScopeName.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +module ScopeVar : + sig + type t + type info = Utils.Uid.MarkedString.info + val fresh : info -> t + val get_info : t -> info + val compare : t -> t -> int + val format_t : Format.formatter -> t -> unit + val hash : t -> int + end +module ScopeVarSet : + sig + type elt = ScopeVar.t + type t + val empty : t + val is_empty : t -> bool + val mem : elt -> t -> bool + val add : elt -> t -> t + val singleton : elt -> t + val remove : elt -> t -> t + val union : t -> t -> t + val inter : t -> t -> t + val disjoint : t -> t -> bool + val diff : t -> t -> t + val compare : t -> t -> int + val equal : t -> t -> bool + val subset : t -> t -> bool + val iter : (elt -> unit) -> t -> unit + val map : (elt -> elt) -> t -> t + val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all : (elt -> bool) -> t -> bool + val exists : (elt -> bool) -> t -> bool + val filter : (elt -> bool) -> t -> t + val filter_map : (elt -> elt option) -> t -> t + val partition : (elt -> bool) -> t -> t * t + val cardinal : t -> int + val elements : t -> elt list + val min_elt : t -> elt + val min_elt_opt : t -> elt option + val max_elt : t -> elt + val max_elt_opt : t -> elt option + val choose : t -> elt + val choose_opt : t -> elt option + val split : elt -> t -> t * bool * t + val find : elt -> t -> elt + val find_opt : elt -> t -> elt option + val find_first : (elt -> bool) -> t -> elt + val find_first_opt : (elt -> bool) -> t -> elt option + val find_last : (elt -> bool) -> t -> elt + val find_last_opt : (elt -> bool) -> t -> elt option + val of_list : elt list -> t + val to_seq_from : elt -> t -> elt Seq.t + val to_seq : t -> elt Seq.t + val add_seq : elt Seq.t -> t -> t + val of_seq : elt Seq.t -> t + end +module ScopeVarMap : + sig + type key = ScopeVar.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +module StructName = Dcalc.Ast.StructName +module StructMap = Dcalc.Ast.StructMap +module StructFieldName = Dcalc.Ast.StructFieldName +module StructFieldMap : + sig + type key = StructFieldName.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +module EnumName = Dcalc.Ast.EnumName +module EnumMap = Dcalc.Ast.EnumMap +module EnumConstructor = Dcalc.Ast.EnumConstructor +module EnumConstructorMap : + sig + type key = EnumConstructor.t + type +'a t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +type location = + ScopeVar of ScopeVar.t Utils.Pos.marked + | SubScopeVar of ScopeName.t * SubScopeName.t Utils.Pos.marked * + ScopeVar.t Utils.Pos.marked +module LocationSet : + sig + type elt = location Utils.Pos.marked + type t + val empty : t + val is_empty : t -> bool + val mem : elt -> t -> bool + val add : elt -> t -> t + val singleton : elt -> t + val remove : elt -> t -> t + val union : t -> t -> t + val inter : t -> t -> t + val disjoint : t -> t -> bool + val diff : t -> t -> t + val compare : t -> t -> int + val equal : t -> t -> bool + val subset : t -> t -> bool + val iter : (elt -> unit) -> t -> unit + val map : (elt -> elt) -> t -> t + val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all : (elt -> bool) -> t -> bool + val exists : (elt -> bool) -> t -> bool + val filter : (elt -> bool) -> t -> t + val filter_map : (elt -> elt option) -> t -> t + val partition : (elt -> bool) -> t -> t * t + val cardinal : t -> int + val elements : t -> elt list + val min_elt : t -> elt + val min_elt_opt : t -> elt option + val max_elt : t -> elt + val max_elt_opt : t -> elt option + val choose : t -> elt + val choose_opt : t -> elt option + val split : elt -> t -> t * bool * t + val find : elt -> t -> elt + val find_opt : elt -> t -> elt option + val find_first : (elt -> bool) -> t -> elt + val find_first_opt : (elt -> bool) -> t -> elt option + val find_last : (elt -> bool) -> t -> elt + val find_last_opt : (elt -> bool) -> t -> elt option + val of_list : elt list -> t + val to_seq_from : elt -> t -> elt Seq.t + val to_seq : t -> elt Seq.t + val add_seq : elt Seq.t -> t -> t + val of_seq : elt Seq.t -> t + end +type typ = + TLit of Dcalc.Ast.typ_lit + | TStruct of StructName.t + | TEnum of EnumName.t + | TArrow of typ Utils.Pos.marked * typ Utils.Pos.marked + | TArray of typ + | TAny +type expr = + ELocation of location + | EVar of expr Bindlib.var Utils.Pos.marked + | EStruct of StructName.t * expr Utils.Pos.marked StructFieldMap.t + | EStructAccess of expr Utils.Pos.marked * StructFieldName.t * StructName.t + | EEnumInj of expr Utils.Pos.marked * EnumConstructor.t * EnumName.t + | EMatch of expr Utils.Pos.marked * EnumName.t * + expr Utils.Pos.marked EnumConstructorMap.t + | ELit of Dcalc.Ast.lit + | EAbs of Utils.Pos.t * (expr, expr Utils.Pos.marked) Bindlib.mbinder * + 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 +val locations_used : expr Utils.Pos.marked -> LocationSet.t +type rule = + Definition of location Utils.Pos.marked * typ Utils.Pos.marked * + expr Utils.Pos.marked + | Assertion of expr Utils.Pos.marked + | Call of ScopeName.t * SubScopeName.t +type scope_decl = { + scope_decl_name : ScopeName.t; + scope_sig : typ Utils.Pos.marked ScopeVarMap.t; + scope_decl_rules : rule list; +} +type struct_ctx = (StructFieldName.t * typ Utils.Pos.marked) list StructMap.t +type enum_ctx = (EnumConstructor.t * typ Utils.Pos.marked) list EnumMap.t +type program = { + program_scopes : scope_decl ScopeMap.t; + program_enums : enum_ctx; + program_structs : struct_ctx; +} +module Var : + sig + type t = expr Bindlib.var + val make : string Utils.Pos.marked -> t + val compare : 'a Bindlib.var -> 'b Bindlib.var -> int + end +type vars = expr Bindlib.mvar +val make_var : Var.t Utils.Pos.marked -> expr Utils.Pos.marked Bindlib.box +val 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 +val make_app : + expr Utils.Pos.marked Bindlib.box -> + expr Utils.Pos.marked Bindlib.box list -> + Utils.Pos.t -> expr Utils.Pos.marked Bindlib.box +val 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 +module VarMap : + sig + type key = Var.t + type 'a t = 'a Stdlib__map.Make(Var).t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end diff --git a/src/catala/scopelang/dependency.mli b/src/catala/scopelang/dependency.mli new file mode 100644 index 00000000..20ce190d --- /dev/null +++ b/src/catala/scopelang/dependency.mli @@ -0,0 +1,240 @@ +module SVertex : + sig + type t = Ast.ScopeName.t + val hash : Ast.ScopeName.t -> int + val compare : + Ast.ScopeName.t -> Ast.ScopeName.t -> int + val equal : + Ast.ScopeName.t -> Ast.ScopeName.t -> bool + val format_t : Format.formatter -> t -> unit + end +module SEdge : + sig + type t = Utils.Pos.t + val compare : 'a -> 'a -> int + val default : Utils.Pos.t + end +module SDependencies : + sig + type t = + Graph__Persistent.Digraph.ConcreteBidirectionalLabeled(SVertex)(SEdge).t + module V : + sig + type t = SVertex.t + val compare : t -> t -> int + val hash : t -> int + val equal : t -> t -> bool + type label = SVertex.t + val create : label -> t + val label : t -> label + end + type vertex = V.t + module E : + sig + type t = SVertex.t * SEdge.t * SVertex.t + val compare : t -> t -> int + type nonrec vertex = vertex + val src : t -> vertex + val dst : t -> vertex + type label = SEdge.t + val create : vertex -> label -> vertex -> t + val label : t -> label + end + type edge = E.t + val is_directed : bool + val is_empty : t -> bool + val nb_vertex : t -> int + val nb_edges : t -> int + val out_degree : t -> vertex -> int + val in_degree : t -> vertex -> int + val mem_vertex : t -> vertex -> bool + val mem_edge : t -> vertex -> vertex -> bool + val mem_edge_e : t -> edge -> bool + val find_edge : t -> vertex -> vertex -> edge + val find_all_edges : t -> vertex -> vertex -> edge list + val succ : t -> vertex -> vertex list + val pred : t -> vertex -> vertex list + val succ_e : t -> vertex -> edge list + val pred_e : t -> vertex -> edge list + val iter_vertex : (vertex -> unit) -> t -> unit + val fold_vertex : (vertex -> 'a -> 'a) -> t -> 'a -> 'a + val iter_edges : (vertex -> vertex -> unit) -> t -> unit + val fold_edges : (vertex -> vertex -> 'a -> 'a) -> t -> 'a -> 'a + val iter_edges_e : (edge -> unit) -> t -> unit + val fold_edges_e : (edge -> 'a -> 'a) -> t -> 'a -> 'a + val map_vertex : (vertex -> vertex) -> t -> t + val iter_succ : (vertex -> unit) -> t -> vertex -> unit + val iter_pred : (vertex -> unit) -> t -> vertex -> unit + val fold_succ : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val fold_pred : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val iter_succ_e : (edge -> unit) -> t -> vertex -> unit + val fold_succ_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val iter_pred_e : (edge -> unit) -> t -> vertex -> unit + val fold_pred_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val empty : t + val add_vertex : t -> vertex -> t + val remove_vertex : t -> vertex -> t + val add_edge : t -> vertex -> vertex -> t + val add_edge_e : t -> edge -> t + val remove_edge : t -> vertex -> vertex -> t + val remove_edge_e : t -> edge -> t + end +module STopologicalTraversal : + sig + val fold : (SDependencies.V.t -> 'a -> 'a) -> SDependencies.t -> 'a -> 'a + val iter : (SDependencies.V.t -> unit) -> SDependencies.t -> unit + end +module SSCC : + sig + val scc : SDependencies.t -> int * (SDependencies.V.t -> int) + val scc_array : SDependencies.t -> SDependencies.V.t list array + val scc_list : SDependencies.t -> SDependencies.V.t list list + end +val build_program_dep_graph : Ast.program -> SDependencies.t +val check_for_cycle_in_scope : SDependencies.t -> unit +val get_scope_ordering : SDependencies.t -> Ast.ScopeName.t list +module TVertex : + sig + type t = + Struct of Ast.StructName.t + | Enum of Ast.EnumName.t + val hash : t -> int + val compare : t -> t -> int + val equal : t -> t -> bool + val format_t : Format.formatter -> t -> unit + val get_info : t -> Ast.StructName.info + end +module TVertexSet : + sig + type elt = TVertex.t + type t = Stdlib__set.Make(TVertex).t + val empty : t + val is_empty : t -> bool + val mem : elt -> t -> bool + val add : elt -> t -> t + val singleton : elt -> t + val remove : elt -> t -> t + val union : t -> t -> t + val inter : t -> t -> t + val disjoint : t -> t -> bool + val diff : t -> t -> t + val compare : t -> t -> int + val equal : t -> t -> bool + val subset : t -> t -> bool + val iter : (elt -> unit) -> t -> unit + val map : (elt -> elt) -> t -> t + val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all : (elt -> bool) -> t -> bool + val exists : (elt -> bool) -> t -> bool + val filter : (elt -> bool) -> t -> t + val filter_map : (elt -> elt option) -> t -> t + val partition : (elt -> bool) -> t -> t * t + val cardinal : t -> int + val elements : t -> elt list + val min_elt : t -> elt + val min_elt_opt : t -> elt option + val max_elt : t -> elt + val max_elt_opt : t -> elt option + val choose : t -> elt + val choose_opt : t -> elt option + val split : elt -> t -> t * bool * t + val find : elt -> t -> elt + val find_opt : elt -> t -> elt option + val find_first : (elt -> bool) -> t -> elt + val find_first_opt : (elt -> bool) -> t -> elt option + val find_last : (elt -> bool) -> t -> elt + val find_last_opt : (elt -> bool) -> t -> elt option + val of_list : elt list -> t + val to_seq_from : elt -> t -> elt Seq.t + val to_seq : t -> elt Seq.t + val add_seq : elt Seq.t -> t -> t + val of_seq : elt Seq.t -> t + end +module TEdge : + sig + type t = Utils.Pos.t + val compare : 'a -> 'a -> int + val default : Utils.Pos.t + end +module TDependencies : + sig + type t = + Graph__Persistent.Digraph.ConcreteBidirectionalLabeled(TVertex)(TEdge).t + module V : + sig + type t = TVertex.t + val compare : t -> t -> int + val hash : t -> int + val equal : t -> t -> bool + type label = TVertex.t + val create : label -> t + val label : t -> label + end + type vertex = V.t + module E : + sig + type t = TVertex.t * TEdge.t * TVertex.t + val compare : t -> t -> int + type nonrec vertex = vertex + val src : t -> vertex + val dst : t -> vertex + type label = TEdge.t + val create : vertex -> label -> vertex -> t + val label : t -> label + end + type edge = E.t + val is_directed : bool + val is_empty : t -> bool + val nb_vertex : t -> int + val nb_edges : t -> int + val out_degree : t -> vertex -> int + val in_degree : t -> vertex -> int + val mem_vertex : t -> vertex -> bool + val mem_edge : t -> vertex -> vertex -> bool + val mem_edge_e : t -> edge -> bool + val find_edge : t -> vertex -> vertex -> edge + val find_all_edges : t -> vertex -> vertex -> edge list + val succ : t -> vertex -> vertex list + val pred : t -> vertex -> vertex list + val succ_e : t -> vertex -> edge list + val pred_e : t -> vertex -> edge list + val iter_vertex : (vertex -> unit) -> t -> unit + val fold_vertex : (vertex -> 'a -> 'a) -> t -> 'a -> 'a + val iter_edges : (vertex -> vertex -> unit) -> t -> unit + val fold_edges : (vertex -> vertex -> 'a -> 'a) -> t -> 'a -> 'a + val iter_edges_e : (edge -> unit) -> t -> unit + val fold_edges_e : (edge -> 'a -> 'a) -> t -> 'a -> 'a + val map_vertex : (vertex -> vertex) -> t -> t + val iter_succ : (vertex -> unit) -> t -> vertex -> unit + val iter_pred : (vertex -> unit) -> t -> vertex -> unit + val fold_succ : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val fold_pred : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val iter_succ_e : (edge -> unit) -> t -> vertex -> unit + val fold_succ_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val iter_pred_e : (edge -> unit) -> t -> vertex -> unit + val fold_pred_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a + val empty : t + val add_vertex : t -> vertex -> t + val remove_vertex : t -> vertex -> t + val add_edge : t -> vertex -> vertex -> t + val add_edge_e : t -> edge -> t + val remove_edge : t -> vertex -> vertex -> t + val remove_edge_e : t -> edge -> t + end +module TTopologicalTraversal : + sig + val fold : (TDependencies.V.t -> 'a -> 'a) -> TDependencies.t -> 'a -> 'a + val iter : (TDependencies.V.t -> unit) -> TDependencies.t -> unit + end +module TSCC : + sig + val scc : TDependencies.t -> int * (TDependencies.V.t -> int) + val scc_array : TDependencies.t -> TDependencies.V.t list array + val scc_list : TDependencies.t -> TDependencies.V.t list list + end +val get_structs_or_enums_in_type : + Ast.typ Utils.Pos.marked -> TVertexSet.t +val build_type_graph : + Ast.struct_ctx -> Ast.enum_ctx -> TDependencies.t +val check_type_cycles : + Ast.struct_ctx -> Ast.enum_ctx -> TVertex.t list diff --git a/src/catala/scopelang/print.mli b/src/catala/scopelang/print.mli new file mode 100644 index 00000000..a9e9adc1 --- /dev/null +++ b/src/catala/scopelang/print.mli @@ -0,0 +1,8 @@ +val needs_parens : Ast.expr Utils.Pos.marked -> bool +val format_var : Format.formatter -> Ast.Var.t -> unit +val format_location : Format.formatter -> Ast.location -> unit +val typ_needs_parens : Ast.typ Utils.Pos.marked -> bool +val format_typ : + Format.formatter -> Ast.typ Utils.Pos.marked -> unit +val format_expr : + Format.formatter -> Ast.expr Utils.Pos.marked -> unit diff --git a/src/catala/scopelang/scope_to_dcalc.mli b/src/catala/scopelang/scope_to_dcalc.mli new file mode 100644 index 00000000..9214cc37 --- /dev/null +++ b/src/catala/scopelang/scope_to_dcalc.mli @@ -0,0 +1,66 @@ +type scope_sigs_ctx = + ((Ast.ScopeVar.t * Dcalc.Ast.typ) list * Dcalc.Ast.Var.t * + Dcalc.Ast.Var.t * Ast.StructName.t * + Ast.StructName.t) + Ast.ScopeMap.t +type ctx = { + structs : Ast.struct_ctx; + enums : Ast.enum_ctx; + scope_name : Ast.ScopeName.t; + scopes_parameters : scope_sigs_ctx; + scope_vars : (Dcalc.Ast.Var.t * Dcalc.Ast.typ) Ast.ScopeVarMap.t; + subscope_vars : + (Dcalc.Ast.Var.t * Dcalc.Ast.typ) Ast.ScopeVarMap.t + Ast.SubScopeMap.t; + local_vars : Dcalc.Ast.Var.t Ast.VarMap.t; +} +val empty_ctx : + Ast.struct_ctx -> + Ast.enum_ctx -> + scope_sigs_ctx -> Ast.ScopeName.t -> ctx +type scope_ctx = Dcalc.Ast.Var.t Ast.ScopeMap.t +val hole_var : Dcalc.Ast.Var.t +val translate_typ : + ctx -> Ast.typ Utils.Pos.marked -> Dcalc.Ast.typ Utils.Pos.marked +val merge_defaults : + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box -> + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box -> + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box +val tag_with_log_entry : + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box -> + Dcalc.Ast.log_entry -> + Utils.Uid.MarkedString.info list -> + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box +val translate_expr : + ctx -> + Ast.expr Utils.Pos.marked -> + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box +val translate_rule : + ctx -> + Ast.rule -> + Ast.rule list -> + Utils.Uid.MarkedString.info -> + Ast.StructName.t -> + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box * ctx +val translate_rules : + ctx -> + Ast.rule list -> + Utils.Uid.MarkedString.info -> + Ast.StructName.t -> + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box * ctx +val translate_scope_decl : + Ast.struct_ctx -> + Ast.enum_ctx -> + scope_sigs_ctx -> + Ast.ScopeName.t -> + Ast.scope_decl -> + Dcalc.Ast.expr Utils.Pos.marked Bindlib.box * Dcalc.Ast.struct_ctx +val build_scope_typ_from_sig : + (Ast.ScopeVar.t * Dcalc.Ast.typ) list -> + Ast.StructName.t -> + Ast.StructName.t -> Utils.Pos.t -> Dcalc.Ast.typ Utils.Pos.marked +val translate_program : + Ast.program -> + Ast.ScopeName.t -> + Dcalc.Ast.program * Dcalc.Ast.expr Utils.Pos.marked * + Dependency.TVertex.t list diff --git a/src/catala/surface/ast.mli b/src/catala/surface/ast.mli new file mode 100644 index 00000000..17e324a0 --- /dev/null +++ b/src/catala/surface/ast.mli @@ -0,0 +1,12569 @@ +type constructor = string +class virtual ['a] constructor_map : + object ('a) + constraint 'a = < visit_constructor : 'b -> 'c -> 'c; .. > + method visit_constructor : 'b -> 'c -> 'c + end +class virtual ['a] constructor_iter : + object ('a) + constraint 'a = < visit_constructor : 'b -> 'c -> unit; .. > + method visit_constructor : 'b -> 'c -> unit + end +type ident = string +class virtual ['a] ident_map : + object ('a) + constraint 'a = < visit_ident : 'b -> 'c -> 'c; .. > + method visit_ident : 'b -> 'c -> 'c + end +class virtual ['a] ident_iter : + object ('a) + constraint 'a = < visit_ident : 'b -> 'c -> unit; .. > + method visit_ident : 'b -> 'c -> unit + end +type qident = ident Utils.Pos.marked list +class virtual ['c] qident_map : + object ('c) + constraint 'c = + < visit_ident : 'd -> 'g -> 'g; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_qident : 'd -> + 'g Utils.Pos.marked list -> 'g Utils.Pos.marked list; + .. > + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> 'g -> 'g + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_qident : + 'd -> 'g Utils.Pos.marked list -> 'g Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] qident_iter : + object ('b) + constraint 'b = + < visit_ident : 'c -> 'd -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_qident : 'c -> 'd Utils.Pos.marked list -> unit; .. > + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> 'd -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_qident : 'c -> 'd Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type primitive_typ = + Integer + | Decimal + | Boolean + | Money + | Duration + | Text + | Date + | Named of constructor +class virtual ['c] primitive_typ_map : + object ('c) + constraint 'c = + < visit_Boolean : 'd -> primitive_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Text : 'd -> primitive_typ; + visit_constructor : 'd -> constructor -> constructor; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; .. > + method visit_Boolean : 'd -> primitive_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] primitive_typ_iter : + object ('b) + constraint 'b = + < visit_Boolean : 'c -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Integer : 'c -> unit; visit_Money : 'c -> unit; + visit_Named : 'c -> constructor -> unit; visit_Text : 'c -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; .. > + method visit_Boolean : 'c -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type base_typ_data = + Primitive of primitive_typ + | Collection of base_typ_data Utils.Pos.marked +class virtual ['c] base_typ_data_map : + object ('c) + constraint 'c = + < visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; .. > + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] base_typ_data_iter : + object ('b) + constraint 'b = + < visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Date : 'c -> unit; visit_Decimal : 'c -> unit; + visit_Duration : 'c -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; .. > + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type base_typ = Condition | Data of base_typ_data +class virtual ['c] base_typ_map : + object ('c) + constraint 'c = + < visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; .. > + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] base_typ_iter : + object ('b) + constraint 'b = + < visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Integer : 'c -> unit; visit_Money : 'c -> unit; + visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; .. > + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type func_typ = { + arg_typ : base_typ Utils.Pos.marked; + return_typ : base_typ Utils.Pos.marked; +} +class virtual ['c] func_typ_map : + object ('c) + constraint 'c = + < visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; .. > + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] func_typ_iter : + object ('b) + constraint 'b = + < visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Integer : 'c -> unit; visit_Money : 'c -> unit; + visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; .. > + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type typ = Base of base_typ | Func of func_typ +class virtual ['c] typ_map : + object ('c) + constraint 'c = + < visit_Base : 'd -> base_typ -> typ; + visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Func : 'd -> func_typ -> typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_typ : 'd -> typ -> typ; .. > + method visit_Base : 'd -> base_typ -> typ + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Func : 'd -> func_typ -> typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] typ_iter : + object ('b) + constraint 'b = + < visit_Base : 'c -> base_typ -> unit; visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Func : 'c -> func_typ -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_typ : 'c -> typ -> unit; .. > + method visit_Base : 'c -> base_typ -> unit + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type struct_decl_field = { + struct_decl_field_name : ident Utils.Pos.marked; + struct_decl_field_typ : typ Utils.Pos.marked; +} +class virtual ['c] struct_decl_field_map : + object ('c) + constraint 'c = + < visit_Base : 'd -> base_typ -> typ; + visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Func : 'd -> func_typ -> typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_struct_decl_field : 'd -> + struct_decl_field -> struct_decl_field; + visit_typ : 'd -> typ -> typ; .. > + method visit_Base : 'd -> base_typ -> typ + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Func : 'd -> func_typ -> typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method visit_struct_decl_field : + 'd -> struct_decl_field -> struct_decl_field + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] struct_decl_field_iter : + object ('b) + constraint 'b = + < visit_Base : 'c -> base_typ -> unit; visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Func : 'c -> func_typ -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_struct_decl_field : 'c -> struct_decl_field -> unit; + visit_typ : 'c -> typ -> unit; .. > + method visit_Base : 'c -> base_typ -> unit + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_struct_decl_field : 'c -> struct_decl_field -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type struct_decl = { + struct_decl_name : constructor Utils.Pos.marked; + struct_decl_fields : struct_decl_field Utils.Pos.marked list; +} +class virtual ['c] struct_decl_map : + object ('c) + constraint 'c = + < visit_Base : 'd -> base_typ -> typ; + visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Func : 'd -> func_typ -> typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_struct_decl : 'd -> struct_decl -> struct_decl; + visit_struct_decl_field : 'd -> + struct_decl_field -> struct_decl_field; + visit_typ : 'd -> typ -> typ; .. > + method visit_Base : 'd -> base_typ -> typ + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Func : 'd -> func_typ -> typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method visit_struct_decl : 'd -> struct_decl -> struct_decl + method visit_struct_decl_field : + 'd -> struct_decl_field -> struct_decl_field + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] struct_decl_iter : + object ('b) + constraint 'b = + < visit_Base : 'c -> base_typ -> unit; visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Func : 'c -> func_typ -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_struct_decl : 'c -> struct_decl -> unit; + visit_struct_decl_field : 'c -> struct_decl_field -> unit; + visit_typ : 'c -> typ -> unit; .. > + method visit_Base : 'c -> base_typ -> unit + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_struct_decl : 'c -> struct_decl -> unit + method visit_struct_decl_field : 'c -> struct_decl_field -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type enum_decl_case = { + enum_decl_case_name : constructor Utils.Pos.marked; + enum_decl_case_typ : typ Utils.Pos.marked option; +} +class virtual ['c] enum_decl_case_map : + object ('c) + constraint 'c = + < visit_Base : 'd -> base_typ -> typ; + visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Func : 'd -> func_typ -> typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_typ : 'd -> typ -> typ; .. > + method visit_Base : 'd -> base_typ -> typ + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Func : 'd -> func_typ -> typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] enum_decl_case_iter : + object ('b) + constraint 'b = + < visit_Base : 'c -> base_typ -> unit; visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Func : 'c -> func_typ -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_enum_decl_case : 'c -> enum_decl_case -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_typ : 'c -> typ -> unit; .. > + method visit_Base : 'c -> base_typ -> unit + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_enum_decl_case : 'c -> enum_decl_case -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type enum_decl = { + enum_decl_name : constructor Utils.Pos.marked; + enum_decl_cases : enum_decl_case Utils.Pos.marked list; +} +class virtual ['c] enum_decl_map : + object ('c) + constraint 'c = + < visit_Base : 'd -> base_typ -> typ; + visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Func : 'd -> func_typ -> typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_enum_decl : 'd -> enum_decl -> enum_decl; + visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_typ : 'd -> typ -> typ; .. > + method visit_Base : 'd -> base_typ -> typ + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Func : 'd -> func_typ -> typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method visit_enum_decl : 'd -> enum_decl -> enum_decl + method visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] enum_decl_iter : + object ('b) + constraint 'b = + < visit_Base : 'c -> base_typ -> unit; visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Func : 'c -> func_typ -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_enum_decl : 'c -> enum_decl -> unit; + visit_enum_decl_case : 'c -> enum_decl_case -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_typ : 'c -> typ -> unit; .. > + method visit_Base : 'c -> base_typ -> unit + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_enum_decl : 'c -> enum_decl -> unit + method visit_enum_decl_case : 'c -> enum_decl_case -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type match_case_pattern = + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) list * + ident Utils.Pos.marked option +class virtual ['c] match_case_pattern_map : + object ('c) + constraint 'c = + < visit_constructor : 'd -> 'g -> 'g; visit_ident : 'd -> 'h -> 'h; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case_pattern : 'd -> + ('g Utils.Pos.marked option * + 'g Utils.Pos.marked) + list * 'h Utils.Pos.marked option -> + ('g Utils.Pos.marked option * + 'g Utils.Pos.marked) + list * 'h Utils.Pos.marked option; + .. > + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> 'g -> 'g + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> 'h -> 'h + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case_pattern : + 'd -> + ('g Utils.Pos.marked option * 'g Utils.Pos.marked) list * + 'h Utils.Pos.marked option -> + ('g Utils.Pos.marked option * 'g Utils.Pos.marked) list * + 'h Utils.Pos.marked option + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] match_case_pattern_iter : + object ('b) + constraint 'b = + < visit_constructor : 'c -> 'd -> unit; visit_ident : 'c -> 'f -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case_pattern : 'c -> + ('d Utils.Pos.marked option * + 'd Utils.Pos.marked) + list * 'f Utils.Pos.marked option -> + unit; + .. > + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> 'd -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> 'f -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case_pattern : + 'c -> + ('d Utils.Pos.marked option * 'd Utils.Pos.marked) list * + 'f Utils.Pos.marked option -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type op_kind = KInt | KDec | KMoney | KDate | KDuration +class virtual ['a] op_kind_map : + object ('a) + constraint 'a = + < visit_KDate : 'b -> op_kind; visit_KDec : 'b -> op_kind; + visit_KDuration : 'b -> op_kind; visit_KInt : 'b -> op_kind; + visit_KMoney : 'b -> op_kind; + visit_op_kind : 'b -> op_kind -> op_kind; .. > + method visit_KDate : 'b -> op_kind + method visit_KDec : 'b -> op_kind + method visit_KDuration : 'b -> op_kind + method visit_KInt : 'b -> op_kind + method visit_KMoney : 'b -> op_kind + method visit_op_kind : 'b -> op_kind -> op_kind + end +class virtual ['a] op_kind_iter : + object ('a) + constraint 'a = + < visit_KDate : 'b -> unit; visit_KDec : 'b -> unit; + visit_KDuration : 'b -> unit; visit_KInt : 'b -> unit; + visit_KMoney : 'b -> unit; visit_op_kind : 'b -> op_kind -> unit; + .. > + method visit_KDate : 'b -> unit + method visit_KDec : 'b -> unit + method visit_KDuration : 'b -> unit + method visit_KInt : 'b -> unit + method visit_KMoney : 'b -> unit + method visit_op_kind : 'b -> op_kind -> unit + end +type binop = + And + | Or + | Add of op_kind + | Sub of op_kind + | Mult of op_kind + | Div of op_kind + | Lt of op_kind + | Lte of op_kind + | Gt of op_kind + | Gte of op_kind + | Eq + | Neq +class virtual ['a] binop_map : + object ('a) + constraint 'a = + < visit_Add : 'b -> op_kind -> binop; visit_And : 'b -> binop; + visit_Div : 'b -> op_kind -> binop; visit_Eq : 'b -> binop; + visit_Gt : 'b -> op_kind -> binop; + visit_Gte : 'b -> op_kind -> binop; visit_KDate : 'b -> op_kind; + visit_KDec : 'b -> op_kind; visit_KDuration : 'b -> op_kind; + visit_KInt : 'b -> op_kind; visit_KMoney : 'b -> op_kind; + visit_Lt : 'b -> op_kind -> binop; + visit_Lte : 'b -> op_kind -> binop; + visit_Mult : 'b -> op_kind -> binop; visit_Neq : 'b -> binop; + visit_Or : 'b -> binop; visit_Sub : 'b -> op_kind -> binop; + visit_binop : 'b -> binop -> binop; + visit_op_kind : 'b -> op_kind -> op_kind; .. > + method visit_Add : 'b -> op_kind -> binop + method visit_And : 'b -> binop + method visit_Div : 'b -> op_kind -> binop + method visit_Eq : 'b -> binop + method visit_Gt : 'b -> op_kind -> binop + method visit_Gte : 'b -> op_kind -> binop + method visit_KDate : 'b -> op_kind + method visit_KDec : 'b -> op_kind + method visit_KDuration : 'b -> op_kind + method visit_KInt : 'b -> op_kind + method visit_KMoney : 'b -> op_kind + method visit_Lt : 'b -> op_kind -> binop + method visit_Lte : 'b -> op_kind -> binop + method visit_Mult : 'b -> op_kind -> binop + method visit_Neq : 'b -> binop + method visit_Or : 'b -> binop + method visit_Sub : 'b -> op_kind -> binop + method visit_binop : 'b -> binop -> binop + method visit_op_kind : 'b -> op_kind -> op_kind + end +class virtual ['a] binop_iter : + object ('a) + constraint 'a = + < visit_Add : 'b -> op_kind -> unit; visit_And : 'b -> unit; + visit_Div : 'b -> op_kind -> unit; visit_Eq : 'b -> unit; + visit_Gt : 'b -> op_kind -> unit; visit_Gte : 'b -> op_kind -> unit; + visit_KDate : 'b -> unit; visit_KDec : 'b -> unit; + visit_KDuration : 'b -> unit; visit_KInt : 'b -> unit; + visit_KMoney : 'b -> unit; visit_Lt : 'b -> op_kind -> unit; + visit_Lte : 'b -> op_kind -> unit; + visit_Mult : 'b -> op_kind -> unit; visit_Neq : 'b -> unit; + visit_Or : 'b -> unit; visit_Sub : 'b -> op_kind -> unit; + visit_binop : 'b -> binop -> unit; + visit_op_kind : 'b -> op_kind -> unit; .. > + method visit_Add : 'b -> op_kind -> unit + method visit_And : 'b -> unit + method visit_Div : 'b -> op_kind -> unit + method visit_Eq : 'b -> unit + method visit_Gt : 'b -> op_kind -> unit + method visit_Gte : 'b -> op_kind -> unit + method visit_KDate : 'b -> unit + method visit_KDec : 'b -> unit + method visit_KDuration : 'b -> unit + method visit_KInt : 'b -> unit + method visit_KMoney : 'b -> unit + method visit_Lt : 'b -> op_kind -> unit + method visit_Lte : 'b -> op_kind -> unit + method visit_Mult : 'b -> op_kind -> unit + method visit_Neq : 'b -> unit + method visit_Or : 'b -> unit + method visit_Sub : 'b -> op_kind -> unit + method visit_binop : 'b -> binop -> unit + method visit_op_kind : 'b -> op_kind -> unit + end +type unop = Not | Minus of op_kind +class virtual ['a] unop_map : + object ('a) + constraint 'a = + < visit_KDate : 'b -> op_kind; visit_KDec : 'b -> op_kind; + visit_KDuration : 'b -> op_kind; visit_KInt : 'b -> op_kind; + visit_KMoney : 'b -> op_kind; visit_Minus : 'b -> op_kind -> unop; + visit_Not : 'b -> unop; visit_op_kind : 'b -> op_kind -> op_kind; + visit_unop : 'b -> unop -> unop; .. > + method visit_KDate : 'b -> op_kind + method visit_KDec : 'b -> op_kind + method visit_KDuration : 'b -> op_kind + method visit_KInt : 'b -> op_kind + method visit_KMoney : 'b -> op_kind + method visit_Minus : 'b -> op_kind -> unop + method visit_Not : 'b -> unop + method visit_op_kind : 'b -> op_kind -> op_kind + method visit_unop : 'b -> unop -> unop + end +class virtual ['a] unop_iter : + object ('a) + constraint 'a = + < visit_KDate : 'b -> unit; visit_KDec : 'b -> unit; + visit_KDuration : 'b -> unit; visit_KInt : 'b -> unit; + visit_KMoney : 'b -> unit; visit_Minus : 'b -> op_kind -> unit; + visit_Not : 'b -> unit; visit_op_kind : 'b -> op_kind -> unit; + visit_unop : 'b -> unop -> unit; .. > + method visit_KDate : 'b -> unit + method visit_KDec : 'b -> unit + method visit_KDuration : 'b -> unit + method visit_KInt : 'b -> unit + method visit_KMoney : 'b -> unit + method visit_Minus : 'b -> op_kind -> unit + method visit_Not : 'b -> unit + method visit_op_kind : 'b -> op_kind -> unit + method visit_unop : 'b -> unop -> unit + end +type builtin_expression = Cardinal | IntToDec | GetDay | GetMonth | GetYear +class virtual ['a] builtin_expression_map : + object ('a) + constraint 'a = + < visit_Cardinal : 'b -> builtin_expression; + visit_GetDay : 'b -> builtin_expression; + visit_GetMonth : 'b -> builtin_expression; + visit_GetYear : 'b -> builtin_expression; + visit_IntToDec : 'b -> builtin_expression; + visit_builtin_expression : 'b -> + builtin_expression -> builtin_expression; + .. > + method visit_Cardinal : 'b -> builtin_expression + method visit_GetDay : 'b -> builtin_expression + method visit_GetMonth : 'b -> builtin_expression + method visit_GetYear : 'b -> builtin_expression + method visit_IntToDec : 'b -> builtin_expression + method visit_builtin_expression : + 'b -> builtin_expression -> builtin_expression + end +class virtual ['a] builtin_expression_iter : + object ('a) + constraint 'a = + < visit_Cardinal : 'b -> unit; visit_GetDay : 'b -> unit; + visit_GetMonth : 'b -> unit; visit_GetYear : 'b -> unit; + visit_IntToDec : 'b -> unit; + visit_builtin_expression : 'b -> builtin_expression -> unit; .. > + method visit_Cardinal : 'b -> unit + method visit_GetDay : 'b -> unit + method visit_GetMonth : 'b -> unit + method visit_GetYear : 'b -> unit + method visit_IntToDec : 'b -> unit + method visit_builtin_expression : 'b -> builtin_expression -> unit + end +type literal_date = { + literal_date_day : int Utils.Pos.marked; + literal_date_month : int Utils.Pos.marked; + literal_date_year : int Utils.Pos.marked; +} +class virtual ['c] literal_date_map : + object ('c) + constraint 'c = + < visit_literal_date : 'd -> literal_date -> literal_date; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + .. > + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] literal_date_iter : + object ('b) + constraint 'b = + < visit_literal_date : 'c -> literal_date -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + .. > + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type literal_number = Int of Z.t | Dec of Z.t * Z.t +class virtual ['a] literal_number_map : + object ('a) + constraint 'a = + < visit_Dec : 'b -> Z.t -> Z.t -> literal_number; + visit_Int : 'b -> Z.t -> literal_number; + visit_literal_number : 'b -> literal_number -> literal_number; .. > + method visit_Dec : 'b -> Z.t -> Z.t -> literal_number + method visit_Int : 'b -> Z.t -> literal_number + method visit_literal_number : 'b -> literal_number -> literal_number + end +class virtual ['a] literal_number_iter : + object ('a) + constraint 'a = + < visit_Dec : 'b -> Z.t -> Z.t -> unit; visit_Int : 'b -> Z.t -> unit; + visit_literal_number : 'b -> literal_number -> unit; .. > + method visit_Dec : 'b -> Z.t -> Z.t -> unit + method visit_Int : 'b -> Z.t -> unit + method visit_literal_number : 'b -> literal_number -> unit + end +type literal_unit = Percent | Year | Month | Day +class virtual ['a] literal_unit_map : + object ('a) + constraint 'a = + < visit_Day : 'b -> literal_unit; visit_Month : 'b -> literal_unit; + visit_Percent : 'b -> literal_unit; visit_Year : 'b -> literal_unit; + visit_literal_unit : 'b -> literal_unit -> literal_unit; .. > + method visit_Day : 'b -> literal_unit + method visit_Month : 'b -> literal_unit + method visit_Percent : 'b -> literal_unit + method visit_Year : 'b -> literal_unit + method visit_literal_unit : 'b -> literal_unit -> literal_unit + end +class virtual ['a] literal_unit_iter : + object ('a) + constraint 'a = + < visit_Day : 'b -> unit; visit_Month : 'b -> unit; + visit_Percent : 'b -> unit; visit_Year : 'b -> unit; + visit_literal_unit : 'b -> literal_unit -> unit; .. > + method visit_Day : 'b -> unit + method visit_Month : 'b -> unit + method visit_Percent : 'b -> unit + method visit_Year : 'b -> unit + method visit_literal_unit : 'b -> literal_unit -> unit + end +type money_amount = { money_amount_units : Z.t; money_amount_cents : Z.t; } +class virtual ['a] money_amount_map : + object ('a) + constraint 'a = + < visit_money_amount : 'b -> money_amount -> money_amount; .. > + method visit_money_amount : 'b -> money_amount -> money_amount + end +class virtual ['a] money_amount_iter : + object ('a) + constraint 'a = < visit_money_amount : 'b -> money_amount -> unit; .. > + method visit_money_amount : 'b -> money_amount -> unit + end +type literal = + LNumber of literal_number Utils.Pos.marked * + literal_unit Utils.Pos.marked option + | LBool of bool + | LMoneyAmount of money_amount + | LDate of literal_date +class virtual ['c] literal_map : + object ('c) + constraint 'c = + < visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Int : 'd -> Z.t -> literal_number; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Month : 'd -> literal_unit; visit_Percent : 'd -> literal_unit; + visit_Year : 'd -> literal_unit; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_money_amount : 'd -> money_amount -> money_amount; .. > + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Int : 'd -> Z.t -> literal_number + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Month : 'd -> literal_unit + method visit_Percent : 'd -> literal_unit + method visit_Year : 'd -> literal_unit + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] literal_iter : + object ('b) + constraint 'b = + < visit_Day : 'c -> unit; visit_Dec : 'c -> Z.t -> Z.t -> unit; + visit_Int : 'c -> Z.t -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Month : 'c -> unit; visit_Percent : 'c -> unit; + visit_Year : 'c -> unit; visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_money_amount : 'c -> money_amount -> unit; .. > + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Month : 'c -> unit + method visit_Percent : 'c -> unit + method visit_Year : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type aggregate_func = + AggregateSum of primitive_typ + | AggregateCount + | AggregateExtremum of bool * primitive_typ * expression Utils.Pos.marked + | AggregateArgExtremum of bool * primitive_typ * + expression Utils.Pos.marked +and collection_op = + Exists + | Forall + | Aggregate of aggregate_func + | Map + | Filter +and match_case = { + match_case_pattern : match_case_pattern Utils.Pos.marked; + match_case_expr : expression Utils.Pos.marked; +} +and match_cases = match_case Utils.Pos.marked list +and expression = + MatchWith of expression Utils.Pos.marked * match_cases Utils.Pos.marked + | IfThenElse of expression Utils.Pos.marked * expression Utils.Pos.marked * + expression Utils.Pos.marked + | Binop of binop Utils.Pos.marked * expression Utils.Pos.marked * + expression Utils.Pos.marked + | Unop of unop Utils.Pos.marked * expression Utils.Pos.marked + | CollectionOp of collection_op Utils.Pos.marked * ident Utils.Pos.marked * + expression Utils.Pos.marked * expression Utils.Pos.marked + | MemCollection of expression Utils.Pos.marked * + expression Utils.Pos.marked + | TestMatchCase of expression Utils.Pos.marked * + match_case_pattern Utils.Pos.marked + | FunCall of expression Utils.Pos.marked * expression Utils.Pos.marked + | Builtin of builtin_expression + | Literal of literal + | EnumInject of constructor Utils.Pos.marked option * + constructor Utils.Pos.marked * expression Utils.Pos.marked option + | EnumProject of expression Utils.Pos.marked * constructor Utils.Pos.marked + | StructLit of constructor Utils.Pos.marked * + (ident Utils.Pos.marked * expression Utils.Pos.marked) list + | ArrayLit of expression Utils.Pos.marked list + | Ident of ident + | Dotted of expression Utils.Pos.marked * + constructor Utils.Pos.marked option * ident Utils.Pos.marked +class virtual ['c] expression_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_Or : 'd -> binop; visit_Percent : 'd -> literal_unit; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_expression : 'd -> expression -> expression; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_unop : 'd -> unop -> unop; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + end +class virtual ['b] expression_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Date : 'c -> unit; visit_Day : 'c -> unit; + visit_Dec : 'c -> Z.t -> Z.t -> unit; visit_Decimal : 'c -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; visit_Exists : 'c -> unit; + visit_Filter : 'c -> unit; visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_GetDay : 'c -> unit; visit_GetMonth : 'c -> unit; + visit_GetYear : 'c -> unit; visit_Gt : 'c -> op_kind -> unit; + visit_Gte : 'c -> op_kind -> unit; visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Int : 'c -> Z.t -> unit; visit_IntToDec : 'c -> unit; + visit_Integer : 'c -> unit; visit_KDate : 'c -> unit; + visit_KDec : 'c -> unit; visit_KDuration : 'c -> unit; + visit_KInt : 'c -> unit; visit_KMoney : 'c -> unit; + visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_Or : 'c -> unit; + visit_Percent : 'c -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_expression : 'c -> expression -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_unop : 'c -> unop -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + end +type exception_to = + NotAnException + | UnlabeledException + | ExceptionToLabel of ident Utils.Pos.marked +class virtual ['c] exception_to_map : + object ('c) + constraint 'c = + < visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_NotAnException : 'd -> exception_to; + visit_UnlabeledException : 'd -> exception_to; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_ident : 'd -> ident -> ident; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + .. > + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_NotAnException : 'd -> exception_to + method visit_UnlabeledException : 'd -> exception_to + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_exception_to : 'd -> exception_to -> exception_to + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] exception_to_iter : + object ('b) + constraint 'b = + < visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_NotAnException : 'c -> unit; + visit_UnlabeledException : 'c -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_ident : 'c -> ident -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + .. > + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_NotAnException : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_exception_to : 'c -> exception_to -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type rule = { + rule_label : ident Utils.Pos.marked option; + rule_exception_to : exception_to; + rule_parameter : ident Utils.Pos.marked option; + rule_condition : expression Utils.Pos.marked option; + rule_name : qident Utils.Pos.marked; + rule_consequence : bool Utils.Pos.marked; +} +class virtual ['c] rule_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_Percent : 'd -> literal_unit; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; visit_unop : 'd -> unop -> unop; + .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + end +class virtual ['b] rule_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Date : 'c -> unit; visit_Day : 'c -> unit; + visit_Dec : 'c -> Z.t -> Z.t -> unit; visit_Decimal : 'c -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_GetDay : 'c -> unit; visit_GetMonth : 'c -> unit; + visit_GetYear : 'c -> unit; visit_Gt : 'c -> op_kind -> unit; + visit_Gte : 'c -> op_kind -> unit; visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Int : 'c -> Z.t -> unit; visit_IntToDec : 'c -> unit; + visit_Integer : 'c -> unit; visit_KDate : 'c -> unit; + visit_KDec : 'c -> unit; visit_KDuration : 'c -> unit; + visit_KInt : 'c -> unit; visit_KMoney : 'c -> unit; + visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; visit_Percent : 'c -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; visit_unop : 'c -> unop -> unit; + .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + end +type definition = { + definition_label : ident Utils.Pos.marked option; + definition_exception_to : exception_to; + definition_name : qident Utils.Pos.marked; + definition_parameter : ident Utils.Pos.marked option; + definition_condition : expression Utils.Pos.marked option; + definition_expr : expression Utils.Pos.marked; +} +class virtual ['c] definition_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_Percent : 'd -> literal_unit; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_unop : 'd -> unop -> unop; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + end +class virtual ['b] definition_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Date : 'c -> unit; visit_Day : 'c -> unit; + visit_Dec : 'c -> Z.t -> Z.t -> unit; visit_Decimal : 'c -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_GetDay : 'c -> unit; visit_GetMonth : 'c -> unit; + visit_GetYear : 'c -> unit; visit_Gt : 'c -> op_kind -> unit; + visit_Gte : 'c -> op_kind -> unit; visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Int : 'c -> Z.t -> unit; visit_IntToDec : 'c -> unit; + visit_Integer : 'c -> unit; visit_KDate : 'c -> unit; + visit_KDec : 'c -> unit; visit_KDuration : 'c -> unit; + visit_KInt : 'c -> unit; visit_KMoney : 'c -> unit; + visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; visit_Percent : 'c -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_unop : 'c -> unop -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + end +type variation_typ = Increasing | Decreasing +class virtual ['c] variation_typ_map : + object ('c) + constraint 'c = + < visit_Decreasing : 'd -> variation_typ; + visit_Increasing : 'd -> variation_typ; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Decreasing : 'd -> variation_typ + method visit_Increasing : 'd -> variation_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] variation_typ_iter : + object ('b) + constraint 'b = + < visit_Decreasing : 'c -> unit; visit_Increasing : 'c -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Decreasing : 'c -> unit + method visit_Increasing : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type meta_assertion = + FixedBy of qident Utils.Pos.marked * ident Utils.Pos.marked + | VariesWith of qident Utils.Pos.marked * expression Utils.Pos.marked * + variation_typ Utils.Pos.marked option +class virtual ['c] meta_assertion_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_Or : 'd -> binop; visit_Percent : 'd -> literal_unit; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_expression : 'd -> expression -> expression; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] meta_assertion_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Date : 'c -> unit; visit_Day : 'c -> unit; + visit_Dec : 'c -> Z.t -> Z.t -> unit; visit_Decimal : 'c -> unit; + visit_Decreasing : 'c -> unit; visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; visit_Exists : 'c -> unit; + visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_GetDay : 'c -> unit; visit_GetMonth : 'c -> unit; + visit_GetYear : 'c -> unit; visit_Gt : 'c -> op_kind -> unit; + visit_Gte : 'c -> op_kind -> unit; visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_Or : 'c -> unit; + visit_Percent : 'c -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_expression : 'c -> expression -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type assertion = { + assertion_condition : expression Utils.Pos.marked option; + assertion_content : expression Utils.Pos.marked; +} +class virtual ['c] assertion_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_Or : 'd -> binop; visit_Percent : 'd -> literal_unit; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_expression : 'd -> expression -> expression; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_unop : 'd -> unop -> unop; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + end +class virtual ['b] assertion_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Date : 'c -> unit; visit_Day : 'c -> unit; + visit_Dec : 'c -> Z.t -> Z.t -> unit; visit_Decimal : 'c -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; visit_Exists : 'c -> unit; + visit_Filter : 'c -> unit; visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_GetDay : 'c -> unit; visit_GetMonth : 'c -> unit; + visit_GetYear : 'c -> unit; visit_Gt : 'c -> op_kind -> unit; + visit_Gte : 'c -> op_kind -> unit; visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Int : 'c -> Z.t -> unit; visit_IntToDec : 'c -> unit; + visit_Integer : 'c -> unit; visit_KDate : 'c -> unit; + visit_KDec : 'c -> unit; visit_KDuration : 'c -> unit; + visit_KInt : 'c -> unit; visit_KMoney : 'c -> unit; + visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_Or : 'c -> unit; + visit_Percent : 'c -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_expression : 'c -> expression -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_unop : 'c -> unop -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + end +type scope_use_item = + Rule of rule + | Definition of definition + | Assertion of assertion + | MetaAssertion of meta_assertion +class virtual ['c] scope_use_item_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Assertion : 'd -> assertion -> scope_use_item; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Definition : 'd -> definition -> scope_use_item; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_Percent : 'd -> literal_unit; + visit_Rule : 'd -> rule -> scope_use_item; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; + visit_scope_use_item : 'd -> scope_use_item -> scope_use_item; + visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Assertion : 'd -> assertion -> scope_use_item + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Definition : 'd -> definition -> scope_use_item + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_Rule : 'd -> rule -> scope_use_item + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method visit_scope_use_item : 'd -> scope_use_item -> scope_use_item + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] scope_use_item_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Assertion : 'c -> assertion -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Date : 'c -> unit; visit_Day : 'c -> unit; + visit_Dec : 'c -> Z.t -> Z.t -> unit; visit_Decimal : 'c -> unit; + visit_Decreasing : 'c -> unit; + visit_Definition : 'c -> definition -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_GetDay : 'c -> unit; visit_GetMonth : 'c -> unit; + visit_GetYear : 'c -> unit; visit_Gt : 'c -> op_kind -> unit; + visit_Gte : 'c -> op_kind -> unit; visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_MetaAssertion : 'c -> meta_assertion -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; visit_Percent : 'c -> unit; + visit_Rule : 'c -> rule -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; + visit_scope_use_item : 'c -> scope_use_item -> unit; + visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Assertion : 'c -> assertion -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Definition : 'c -> definition -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_MetaAssertion : 'c -> meta_assertion -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_Rule : 'c -> rule -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method visit_scope_use_item : 'c -> scope_use_item -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type scope_use = { + scope_use_condition : expression Utils.Pos.marked option; + scope_use_name : constructor Utils.Pos.marked; + scope_use_items : scope_use_item Utils.Pos.marked list; +} +class virtual ['c] scope_use_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Assertion : 'd -> assertion -> scope_use_item; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Definition : 'd -> definition -> scope_use_item; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_Percent : 'd -> literal_unit; + visit_Rule : 'd -> rule -> scope_use_item; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; + visit_scope_use : 'd -> scope_use -> scope_use; + visit_scope_use_item : 'd -> scope_use_item -> scope_use_item; + visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Assertion : 'd -> assertion -> scope_use_item + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Definition : 'd -> definition -> scope_use_item + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_Rule : 'd -> rule -> scope_use_item + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method visit_scope_use : 'd -> scope_use -> scope_use + method visit_scope_use_item : 'd -> scope_use_item -> scope_use_item + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] scope_use_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Assertion : 'c -> assertion -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Date : 'c -> unit; visit_Day : 'c -> unit; + visit_Dec : 'c -> Z.t -> Z.t -> unit; visit_Decimal : 'c -> unit; + visit_Decreasing : 'c -> unit; + visit_Definition : 'c -> definition -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_GetDay : 'c -> unit; visit_GetMonth : 'c -> unit; + visit_GetYear : 'c -> unit; visit_Gt : 'c -> op_kind -> unit; + visit_Gte : 'c -> op_kind -> unit; visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_MetaAssertion : 'c -> meta_assertion -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; visit_Percent : 'c -> unit; + visit_Rule : 'c -> rule -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; + visit_scope_use : 'c -> scope_use -> unit; + visit_scope_use_item : 'c -> scope_use_item -> unit; + visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Assertion : 'c -> assertion -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Definition : 'c -> definition -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_MetaAssertion : 'c -> meta_assertion -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_Rule : 'c -> rule -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method visit_scope_use : 'c -> scope_use -> unit + method visit_scope_use_item : 'c -> scope_use_item -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type scope_decl_context_scope = { + scope_decl_context_scope_name : ident Utils.Pos.marked; + scope_decl_context_scope_sub_scope : constructor Utils.Pos.marked; +} +class virtual ['c] scope_decl_context_scope_map : + object ('c) + constraint 'c = + < visit_constructor : 'd -> constructor -> constructor; + visit_ident : 'd -> ident -> ident; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + .. > + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] scope_decl_context_scope_iter : + object ('b) + constraint 'b = + < visit_constructor : 'c -> constructor -> unit; + visit_ident : 'c -> ident -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + .. > + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type scope_decl_context_data = { + scope_decl_context_item_name : ident Utils.Pos.marked; + scope_decl_context_item_typ : typ Utils.Pos.marked; +} +class virtual ['c] scope_decl_context_data_map : + object ('c) + constraint 'c = + < visit_Base : 'd -> base_typ -> typ; + visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Func : 'd -> func_typ -> typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_typ : 'd -> typ -> typ; .. > + method visit_Base : 'd -> base_typ -> typ + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Func : 'd -> func_typ -> typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method private visit_string : 'env. 'env -> string -> string + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] scope_decl_context_data_iter : + object ('b) + constraint 'b = + < visit_Base : 'c -> base_typ -> unit; visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Func : 'c -> func_typ -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_typ : 'c -> typ -> unit; .. > + method visit_Base : 'c -> base_typ -> unit + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type scope_decl_context_item = + ContextData of scope_decl_context_data + | ContextScope of scope_decl_context_scope +class virtual ['c] scope_decl_context_item_map : + object ('c) + constraint 'c = + < visit_Base : 'd -> base_typ -> typ; + visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_ContextData : 'd -> + scope_decl_context_data -> + scope_decl_context_item; + visit_ContextScope : 'd -> + scope_decl_context_scope -> + scope_decl_context_item; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Func : 'd -> func_typ -> typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_scope_decl_context_item : 'd -> + scope_decl_context_item -> + scope_decl_context_item; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + visit_typ : 'd -> typ -> typ; .. > + method visit_Base : 'd -> base_typ -> typ + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_ContextData : + 'd -> scope_decl_context_data -> scope_decl_context_item + method visit_ContextScope : + 'd -> scope_decl_context_scope -> scope_decl_context_item + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Func : 'd -> func_typ -> typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method visit_scope_decl_context_item : + 'd -> scope_decl_context_item -> scope_decl_context_item + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method private visit_string : 'env. 'env -> string -> string + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] scope_decl_context_item_iter : + object ('b) + constraint 'b = + < visit_Base : 'c -> base_typ -> unit; visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_ContextData : 'c -> scope_decl_context_data -> unit; + visit_ContextScope : 'c -> scope_decl_context_scope -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Func : 'c -> func_typ -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_scope_decl_context_item : 'c -> scope_decl_context_item -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + visit_typ : 'c -> typ -> unit; .. > + method visit_Base : 'c -> base_typ -> unit + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_ContextData : 'c -> scope_decl_context_data -> unit + method visit_ContextScope : 'c -> scope_decl_context_scope -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method visit_scope_decl_context_item : + 'c -> scope_decl_context_item -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type scope_decl = { + scope_decl_name : constructor Utils.Pos.marked; + scope_decl_context : scope_decl_context_item Utils.Pos.marked list; +} +class virtual ['c] scope_decl_map : + object ('c) + constraint 'c = + < visit_Base : 'd -> base_typ -> typ; + visit_Boolean : 'd -> primitive_typ; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_Condition : 'd -> base_typ; + visit_ContextData : 'd -> + scope_decl_context_data -> + scope_decl_context_item; + visit_ContextScope : 'd -> + scope_decl_context_scope -> + scope_decl_context_item; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; + visit_Decimal : 'd -> primitive_typ; + visit_Duration : 'd -> primitive_typ; + visit_Func : 'd -> func_typ -> typ; + visit_Integer : 'd -> primitive_typ; + visit_Money : 'd -> primitive_typ; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Text : 'd -> primitive_typ; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_constructor : 'd -> constructor -> constructor; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_scope_decl : 'd -> scope_decl -> scope_decl; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_scope_decl_context_item : 'd -> + scope_decl_context_item -> + scope_decl_context_item; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + visit_typ : 'd -> typ -> typ; .. > + method visit_Base : 'd -> base_typ -> typ + method visit_Boolean : 'd -> primitive_typ + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_Condition : 'd -> base_typ + method visit_ContextData : + 'd -> scope_decl_context_data -> scope_decl_context_item + method visit_ContextScope : + 'd -> scope_decl_context_scope -> scope_decl_context_item + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Decimal : 'd -> primitive_typ + method visit_Duration : 'd -> primitive_typ + method visit_Func : 'd -> func_typ -> typ + method visit_Integer : 'd -> primitive_typ + method visit_Money : 'd -> primitive_typ + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Text : 'd -> primitive_typ + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_constructor : 'd -> constructor -> constructor + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_scope_decl : 'd -> scope_decl -> scope_decl + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method visit_scope_decl_context_item : + 'd -> scope_decl_context_item -> scope_decl_context_item + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method private visit_string : 'env. 'env -> string -> string + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] scope_decl_iter : + object ('b) + constraint 'b = + < visit_Base : 'c -> base_typ -> unit; visit_Boolean : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_ContextData : 'c -> scope_decl_context_data -> unit; + visit_ContextScope : 'c -> scope_decl_context_scope -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Decimal : 'c -> unit; visit_Duration : 'c -> unit; + visit_Func : 'c -> func_typ -> unit; visit_Integer : 'c -> unit; + visit_Money : 'c -> unit; visit_Named : 'c -> constructor -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Text : 'c -> unit; visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_scope_decl : 'c -> scope_decl -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_scope_decl_context_item : 'c -> scope_decl_context_item -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + visit_typ : 'c -> typ -> unit; .. > + method visit_Base : 'c -> base_typ -> unit + method visit_Boolean : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_ContextData : 'c -> scope_decl_context_data -> unit + method visit_ContextScope : 'c -> scope_decl_context_scope -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Decimal : 'c -> unit + method visit_Duration : 'c -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_Integer : 'c -> unit + method visit_Money : 'c -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Text : 'c -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_constructor : 'c -> constructor -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_scope_decl : 'c -> scope_decl -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method visit_scope_decl_context_item : + 'c -> scope_decl_context_item -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type code_item = + ScopeUse of scope_use + | ScopeDecl of scope_decl + | StructDecl of struct_decl + | EnumDecl of enum_decl +class virtual ['c] code_item_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Assertion : 'd -> assertion -> scope_use_item; + visit_Base : 'd -> base_typ -> typ; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Condition : 'd -> base_typ; + visit_ContextData : 'd -> + scope_decl_context_data -> + scope_decl_context_item; + visit_ContextScope : 'd -> + scope_decl_context_scope -> + scope_decl_context_item; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Definition : 'd -> definition -> scope_use_item; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumDecl : 'd -> enum_decl -> code_item; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Func : 'd -> func_typ -> typ; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_Percent : 'd -> literal_unit; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Rule : 'd -> rule -> scope_use_item; + visit_ScopeDecl : 'd -> scope_decl -> code_item; + visit_ScopeUse : 'd -> scope_use -> code_item; + visit_StructDecl : 'd -> struct_decl -> code_item; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_code_item : 'd -> code_item -> code_item; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_enum_decl : 'd -> enum_decl -> enum_decl; + visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; + visit_scope_decl : 'd -> scope_decl -> scope_decl; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_scope_decl_context_item : 'd -> + scope_decl_context_item -> + scope_decl_context_item; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + visit_scope_use : 'd -> scope_use -> scope_use; + visit_scope_use_item : 'd -> scope_use_item -> scope_use_item; + visit_struct_decl : 'd -> struct_decl -> struct_decl; + visit_struct_decl_field : 'd -> + struct_decl_field -> struct_decl_field; + visit_typ : 'd -> typ -> typ; visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Assertion : 'd -> assertion -> scope_use_item + method visit_Base : 'd -> base_typ -> typ + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Condition : 'd -> base_typ + method visit_ContextData : + 'd -> scope_decl_context_data -> scope_decl_context_item + method visit_ContextScope : + 'd -> scope_decl_context_scope -> scope_decl_context_item + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Definition : 'd -> definition -> scope_use_item + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumDecl : 'd -> enum_decl -> code_item + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Func : 'd -> func_typ -> typ + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Rule : 'd -> rule -> scope_use_item + method visit_ScopeDecl : 'd -> scope_decl -> code_item + method visit_ScopeUse : 'd -> scope_use -> code_item + method visit_StructDecl : 'd -> struct_decl -> code_item + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_code_item : 'd -> code_item -> code_item + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_enum_decl : 'd -> enum_decl -> enum_decl + method visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method visit_scope_decl : 'd -> scope_decl -> scope_decl + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method visit_scope_decl_context_item : + 'd -> scope_decl_context_item -> scope_decl_context_item + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method visit_scope_use : 'd -> scope_use -> scope_use + method visit_scope_use_item : 'd -> scope_use_item -> scope_use_item + method private visit_string : 'env. 'env -> string -> string + method visit_struct_decl : 'd -> struct_decl -> struct_decl + method visit_struct_decl_field : + 'd -> struct_decl_field -> struct_decl_field + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] code_item_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Assertion : 'c -> assertion -> unit; + visit_Base : 'c -> base_typ -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_ContextData : 'c -> scope_decl_context_data -> unit; + visit_ContextScope : 'c -> scope_decl_context_scope -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Day : 'c -> unit; visit_Dec : 'c -> Z.t -> Z.t -> unit; + visit_Decimal : 'c -> unit; visit_Decreasing : 'c -> unit; + visit_Definition : 'c -> definition -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumDecl : 'c -> enum_decl -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Func : 'c -> func_typ -> unit; visit_GetDay : 'c -> unit; + visit_GetMonth : 'c -> unit; visit_GetYear : 'c -> unit; + visit_Gt : 'c -> op_kind -> unit; visit_Gte : 'c -> op_kind -> unit; + visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_MetaAssertion : 'c -> meta_assertion -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; visit_Percent : 'c -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Rule : 'c -> rule -> unit; + visit_ScopeDecl : 'c -> scope_decl -> unit; + visit_ScopeUse : 'c -> scope_use -> unit; + visit_StructDecl : 'c -> struct_decl -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_code_item : 'c -> code_item -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_enum_decl : 'c -> enum_decl -> unit; + visit_enum_decl_case : 'c -> enum_decl_case -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; + visit_scope_decl : 'c -> scope_decl -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_scope_decl_context_item : 'c -> scope_decl_context_item -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + visit_scope_use : 'c -> scope_use -> unit; + visit_scope_use_item : 'c -> scope_use_item -> unit; + visit_struct_decl : 'c -> struct_decl -> unit; + visit_struct_decl_field : 'c -> struct_decl_field -> unit; + visit_typ : 'c -> typ -> unit; visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Assertion : 'c -> assertion -> unit + method visit_Base : 'c -> base_typ -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_ContextData : 'c -> scope_decl_context_data -> unit + method visit_ContextScope : 'c -> scope_decl_context_scope -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Definition : 'c -> definition -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumDecl : 'c -> enum_decl -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_MetaAssertion : 'c -> meta_assertion -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Rule : 'c -> rule -> unit + method visit_ScopeDecl : 'c -> scope_decl -> unit + method visit_ScopeUse : 'c -> scope_use -> unit + method visit_StructDecl : 'c -> struct_decl -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_code_item : 'c -> code_item -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_enum_decl : 'c -> enum_decl -> unit + method visit_enum_decl_case : 'c -> enum_decl_case -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method visit_scope_decl : 'c -> scope_decl -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method visit_scope_decl_context_item : + 'c -> scope_decl_context_item -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method visit_scope_use : 'c -> scope_use -> unit + method visit_scope_use_item : 'c -> scope_use_item -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_struct_decl : 'c -> struct_decl -> unit + method visit_struct_decl_field : 'c -> struct_decl_field -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type code_block = code_item Utils.Pos.marked list +class virtual ['c] code_block_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Assertion : 'd -> assertion -> scope_use_item; + visit_Base : 'd -> base_typ -> typ; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Condition : 'd -> base_typ; + visit_ContextData : 'd -> + scope_decl_context_data -> + scope_decl_context_item; + visit_ContextScope : 'd -> + scope_decl_context_scope -> + scope_decl_context_item; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Definition : 'd -> definition -> scope_use_item; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumDecl : 'd -> enum_decl -> code_item; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Func : 'd -> func_typ -> typ; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_Percent : 'd -> literal_unit; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Rule : 'd -> rule -> scope_use_item; + visit_ScopeDecl : 'd -> scope_decl -> code_item; + visit_ScopeUse : 'd -> scope_use -> code_item; + visit_StructDecl : 'd -> struct_decl -> code_item; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_code_block : 'd -> + code_item Utils.Pos.marked list -> + code_item Utils.Pos.marked list; + visit_code_item : 'd -> code_item -> code_item; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_enum_decl : 'd -> enum_decl -> enum_decl; + visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; + visit_scope_decl : 'd -> scope_decl -> scope_decl; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_scope_decl_context_item : 'd -> + scope_decl_context_item -> + scope_decl_context_item; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + visit_scope_use : 'd -> scope_use -> scope_use; + visit_scope_use_item : 'd -> scope_use_item -> scope_use_item; + visit_struct_decl : 'd -> struct_decl -> struct_decl; + visit_struct_decl_field : 'd -> + struct_decl_field -> struct_decl_field; + visit_typ : 'd -> typ -> typ; visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Assertion : 'd -> assertion -> scope_use_item + method visit_Base : 'd -> base_typ -> typ + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Condition : 'd -> base_typ + method visit_ContextData : + 'd -> scope_decl_context_data -> scope_decl_context_item + method visit_ContextScope : + 'd -> scope_decl_context_scope -> scope_decl_context_item + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Definition : 'd -> definition -> scope_use_item + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumDecl : 'd -> enum_decl -> code_item + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Func : 'd -> func_typ -> typ + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Rule : 'd -> rule -> scope_use_item + method visit_ScopeDecl : 'd -> scope_decl -> code_item + method visit_ScopeUse : 'd -> scope_use -> code_item + method visit_StructDecl : 'd -> struct_decl -> code_item + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_code_block : + 'd -> + code_item Utils.Pos.marked list -> code_item Utils.Pos.marked list + method visit_code_item : 'd -> code_item -> code_item + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_enum_decl : 'd -> enum_decl -> enum_decl + method visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method visit_scope_decl : 'd -> scope_decl -> scope_decl + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method visit_scope_decl_context_item : + 'd -> scope_decl_context_item -> scope_decl_context_item + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method visit_scope_use : 'd -> scope_use -> scope_use + method visit_scope_use_item : 'd -> scope_use_item -> scope_use_item + method private visit_string : 'env. 'env -> string -> string + method visit_struct_decl : 'd -> struct_decl -> struct_decl + method visit_struct_decl_field : + 'd -> struct_decl_field -> struct_decl_field + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] code_block_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Assertion : 'c -> assertion -> unit; + visit_Base : 'c -> base_typ -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_ContextData : 'c -> scope_decl_context_data -> unit; + visit_ContextScope : 'c -> scope_decl_context_scope -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Day : 'c -> unit; visit_Dec : 'c -> Z.t -> Z.t -> unit; + visit_Decimal : 'c -> unit; visit_Decreasing : 'c -> unit; + visit_Definition : 'c -> definition -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumDecl : 'c -> enum_decl -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Func : 'c -> func_typ -> unit; visit_GetDay : 'c -> unit; + visit_GetMonth : 'c -> unit; visit_GetYear : 'c -> unit; + visit_Gt : 'c -> op_kind -> unit; visit_Gte : 'c -> op_kind -> unit; + visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_MetaAssertion : 'c -> meta_assertion -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; visit_Percent : 'c -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Rule : 'c -> rule -> unit; + visit_ScopeDecl : 'c -> scope_decl -> unit; + visit_ScopeUse : 'c -> scope_use -> unit; + visit_StructDecl : 'c -> struct_decl -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit; + visit_code_item : 'c -> code_item -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_enum_decl : 'c -> enum_decl -> unit; + visit_enum_decl_case : 'c -> enum_decl_case -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; + visit_scope_decl : 'c -> scope_decl -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_scope_decl_context_item : 'c -> scope_decl_context_item -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + visit_scope_use : 'c -> scope_use -> unit; + visit_scope_use_item : 'c -> scope_use_item -> unit; + visit_struct_decl : 'c -> struct_decl -> unit; + visit_struct_decl_field : 'c -> struct_decl_field -> unit; + visit_typ : 'c -> typ -> unit; visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Assertion : 'c -> assertion -> unit + method visit_Base : 'c -> base_typ -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_ContextData : 'c -> scope_decl_context_data -> unit + method visit_ContextScope : 'c -> scope_decl_context_scope -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Definition : 'c -> definition -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumDecl : 'c -> enum_decl -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_MetaAssertion : 'c -> meta_assertion -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Rule : 'c -> rule -> unit + method visit_ScopeDecl : 'c -> scope_decl -> unit + method visit_ScopeUse : 'c -> scope_use -> unit + method visit_StructDecl : 'c -> struct_decl -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit + method visit_code_item : 'c -> code_item -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_enum_decl : 'c -> enum_decl -> unit + method visit_enum_decl_case : 'c -> enum_decl_case -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method visit_scope_decl : 'c -> scope_decl -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method visit_scope_decl_context_item : + 'c -> scope_decl_context_item -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method visit_scope_use : 'c -> scope_use -> unit + method visit_scope_use_item : 'c -> scope_use_item -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_struct_decl : 'c -> struct_decl -> unit + method visit_struct_decl_field : 'c -> struct_decl_field -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type source_repr = string Utils.Pos.marked +class virtual ['c] source_repr_map : + object ('c) + constraint 'c = + < visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_source_repr : 'd -> 'g Utils.Pos.marked -> 'g Utils.Pos.marked; + .. > + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_source_repr : + 'd -> 'g Utils.Pos.marked -> 'g Utils.Pos.marked + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] source_repr_iter : + object ('b) + constraint 'b = + < visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_source_repr : 'c -> 'd Utils.Pos.marked -> unit; .. > + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_source_repr : 'c -> 'd Utils.Pos.marked -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type law_article = { + law_article_name : string Utils.Pos.marked; + law_article_id : string option; + law_article_expiration_date : string option; +} +class virtual ['c] law_article_map : + object ('c) + constraint 'c = + < visit_law_article : 'd -> law_article -> law_article; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + .. > + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method visit_law_article : 'd -> law_article -> law_article + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] law_article_iter : + object ('b) + constraint 'b = + < visit_law_article : 'c -> law_article -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + .. > + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method visit_law_article : 'c -> law_article -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type law_include = + PdfFile of string Utils.Pos.marked * int option + | CatalaFile of string Utils.Pos.marked + | LegislativeText of string Utils.Pos.marked +class virtual ['c] law_include_map : + object ('c) + constraint 'c = + < visit_CatalaFile : 'd -> string Utils.Pos.marked -> law_include; + visit_LegislativeText : 'd -> string Utils.Pos.marked -> law_include; + visit_PdfFile : 'd -> + string Utils.Pos.marked -> int option -> law_include; + visit_law_include : 'd -> law_include -> law_include; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + .. > + method visit_CatalaFile : 'd -> string Utils.Pos.marked -> law_include + method visit_LegislativeText : + 'd -> string Utils.Pos.marked -> law_include + method visit_PdfFile : + 'd -> string Utils.Pos.marked -> int option -> law_include + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method visit_law_include : 'd -> law_include -> law_include + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] law_include_iter : + object ('b) + constraint 'b = + < visit_CatalaFile : 'c -> string Utils.Pos.marked -> unit; + visit_LegislativeText : 'c -> string Utils.Pos.marked -> unit; + visit_PdfFile : 'c -> string Utils.Pos.marked -> int option -> unit; + visit_law_include : 'c -> law_include -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + .. > + method visit_CatalaFile : 'c -> string Utils.Pos.marked -> unit + method visit_LegislativeText : 'c -> string Utils.Pos.marked -> unit + method visit_PdfFile : + 'c -> string Utils.Pos.marked -> int option -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method visit_law_include : 'c -> law_include -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type law_article_item = + LawText of string + | CodeBlock of code_block * source_repr +class virtual ['c] law_article_item_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Assertion : 'd -> assertion -> scope_use_item; + visit_Base : 'd -> base_typ -> typ; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CodeBlock : 'd -> + code_block -> + string Utils.Pos.marked -> law_article_item; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Condition : 'd -> base_typ; + visit_ContextData : 'd -> + scope_decl_context_data -> + scope_decl_context_item; + visit_ContextScope : 'd -> + scope_decl_context_scope -> + scope_decl_context_item; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Definition : 'd -> definition -> scope_use_item; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumDecl : 'd -> enum_decl -> code_item; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Func : 'd -> func_typ -> typ; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; visit_KDate : 'd -> op_kind; + visit_KDec : 'd -> op_kind; visit_KDuration : 'd -> op_kind; + visit_KInt : 'd -> op_kind; visit_KMoney : 'd -> op_kind; + visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_LawText : 'd -> string -> law_article_item; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_Percent : 'd -> literal_unit; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Rule : 'd -> rule -> scope_use_item; + visit_ScopeDecl : 'd -> scope_decl -> code_item; + visit_ScopeUse : 'd -> scope_use -> code_item; + visit_StructDecl : 'd -> struct_decl -> code_item; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_code_block : 'd -> + code_item Utils.Pos.marked list -> + code_item Utils.Pos.marked list; + visit_code_item : 'd -> code_item -> code_item; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_enum_decl : 'd -> enum_decl -> enum_decl; + visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_law_article_item : 'd -> law_article_item -> law_article_item; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; + visit_scope_decl : 'd -> scope_decl -> scope_decl; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_scope_decl_context_item : 'd -> + scope_decl_context_item -> + scope_decl_context_item; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + visit_scope_use : 'd -> scope_use -> scope_use; + visit_scope_use_item : 'd -> scope_use_item -> scope_use_item; + visit_source_repr : 'd -> + string Utils.Pos.marked -> + string Utils.Pos.marked; + visit_struct_decl : 'd -> struct_decl -> struct_decl; + visit_struct_decl_field : 'd -> + struct_decl_field -> struct_decl_field; + visit_typ : 'd -> typ -> typ; visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Assertion : 'd -> assertion -> scope_use_item + method visit_Base : 'd -> base_typ -> typ + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CodeBlock : + 'd -> code_block -> string Utils.Pos.marked -> law_article_item + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Condition : 'd -> base_typ + method visit_ContextData : + 'd -> scope_decl_context_data -> scope_decl_context_item + method visit_ContextScope : + 'd -> scope_decl_context_scope -> scope_decl_context_item + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Definition : 'd -> definition -> scope_use_item + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumDecl : 'd -> enum_decl -> code_item + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Func : 'd -> func_typ -> typ + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_LawText : 'd -> string -> law_article_item + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_Percent : 'd -> literal_unit + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Rule : 'd -> rule -> scope_use_item + method visit_ScopeDecl : 'd -> scope_decl -> code_item + method visit_ScopeUse : 'd -> scope_use -> code_item + method visit_StructDecl : 'd -> struct_decl -> code_item + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_code_block : + 'd -> + code_item Utils.Pos.marked list -> code_item Utils.Pos.marked list + method visit_code_item : 'd -> code_item -> code_item + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_enum_decl : 'd -> enum_decl -> enum_decl + method visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method visit_law_article_item : + 'd -> law_article_item -> law_article_item + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method visit_scope_decl : 'd -> scope_decl -> scope_decl + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method visit_scope_decl_context_item : + 'd -> scope_decl_context_item -> scope_decl_context_item + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method visit_scope_use : 'd -> scope_use -> scope_use + method visit_scope_use_item : 'd -> scope_use_item -> scope_use_item + method visit_source_repr : + 'd -> string Utils.Pos.marked -> string Utils.Pos.marked + method private visit_string : 'env. 'env -> string -> string + method visit_struct_decl : 'd -> struct_decl -> struct_decl + method visit_struct_decl_field : + 'd -> struct_decl_field -> struct_decl_field + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] law_article_item_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Assertion : 'c -> assertion -> unit; + visit_Base : 'c -> base_typ -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CodeBlock : 'c -> code_block -> string Utils.Pos.marked -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_ContextData : 'c -> scope_decl_context_data -> unit; + visit_ContextScope : 'c -> scope_decl_context_scope -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Day : 'c -> unit; visit_Dec : 'c -> Z.t -> Z.t -> unit; + visit_Decimal : 'c -> unit; visit_Decreasing : 'c -> unit; + visit_Definition : 'c -> definition -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumDecl : 'c -> enum_decl -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Func : 'c -> func_typ -> unit; visit_GetDay : 'c -> unit; + visit_GetMonth : 'c -> unit; visit_GetYear : 'c -> unit; + visit_Gt : 'c -> op_kind -> unit; visit_Gte : 'c -> op_kind -> unit; + visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_LawText : 'c -> string -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_MetaAssertion : 'c -> meta_assertion -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; visit_Percent : 'c -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Rule : 'c -> rule -> unit; + visit_ScopeDecl : 'c -> scope_decl -> unit; + visit_ScopeUse : 'c -> scope_use -> unit; + visit_StructDecl : 'c -> struct_decl -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit; + visit_code_item : 'c -> code_item -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_enum_decl : 'c -> enum_decl -> unit; + visit_enum_decl_case : 'c -> enum_decl_case -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_law_article_item : 'c -> law_article_item -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; + visit_scope_decl : 'c -> scope_decl -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_scope_decl_context_item : 'c -> scope_decl_context_item -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + visit_scope_use : 'c -> scope_use -> unit; + visit_scope_use_item : 'c -> scope_use_item -> unit; + visit_source_repr : 'c -> string Utils.Pos.marked -> unit; + visit_struct_decl : 'c -> struct_decl -> unit; + visit_struct_decl_field : 'c -> struct_decl_field -> unit; + visit_typ : 'c -> typ -> unit; visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Assertion : 'c -> assertion -> unit + method visit_Base : 'c -> base_typ -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CodeBlock : + 'c -> code_block -> string Utils.Pos.marked -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_ContextData : 'c -> scope_decl_context_data -> unit + method visit_ContextScope : 'c -> scope_decl_context_scope -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Definition : 'c -> definition -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumDecl : 'c -> enum_decl -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_LawText : 'c -> string -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_MetaAssertion : 'c -> meta_assertion -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_Percent : 'c -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Rule : 'c -> rule -> unit + method visit_ScopeDecl : 'c -> scope_decl -> unit + method visit_ScopeUse : 'c -> scope_use -> unit + method visit_StructDecl : 'c -> struct_decl -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit + method visit_code_item : 'c -> code_item -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_enum_decl : 'c -> enum_decl -> unit + method visit_enum_decl_case : 'c -> enum_decl_case -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method visit_law_article_item : 'c -> law_article_item -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method visit_scope_decl : 'c -> scope_decl -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method visit_scope_decl_context_item : + 'c -> scope_decl_context_item -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method visit_scope_use : 'c -> scope_use -> unit + method visit_scope_use_item : 'c -> scope_use_item -> unit + method visit_source_repr : 'c -> string Utils.Pos.marked -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_struct_decl : 'c -> struct_decl -> unit + method visit_struct_decl_field : 'c -> struct_decl_field -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type law_heading = { + law_heading_name : string; + law_heading_precedence : int; +} +class virtual ['c] law_heading_map : + object ('c) + constraint 'c = + < visit_law_heading : 'd -> law_heading -> law_heading; .. > + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method private visit_bool : 'env. 'env -> bool -> bool + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method private visit_float : 'env. 'env -> float -> float + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method visit_law_heading : 'd -> law_heading -> law_heading + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method private visit_string : 'env. 'env -> string -> string + method private visit_unit : 'env. 'env -> unit -> unit + end +class virtual ['b] law_heading_iter : + object ('b) + constraint 'b = < visit_law_heading : 'c -> law_heading -> unit; .. > + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method private visit_float : 'env. 'env -> float -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method visit_law_heading : 'c -> law_heading -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method private visit_string : 'env. 'env -> string -> unit + method private visit_unit : 'env. 'env -> unit -> unit + end +type law_structure = + LawInclude of law_include + | LawHeading of law_heading * law_structure list + | LawArticle of law_article * law_article_item list + | MetadataBlock of code_block * source_repr + | IntermediateText of string +class virtual ['c] law_structure_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Assertion : 'd -> assertion -> scope_use_item; + visit_Base : 'd -> base_typ -> typ; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CatalaFile : 'd -> string Utils.Pos.marked -> law_include; + visit_CodeBlock : 'd -> + code_block -> + string Utils.Pos.marked -> law_article_item; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Condition : 'd -> base_typ; + visit_ContextData : 'd -> + scope_decl_context_data -> + scope_decl_context_item; + visit_ContextScope : 'd -> + scope_decl_context_scope -> + scope_decl_context_item; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Definition : 'd -> definition -> scope_use_item; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumDecl : 'd -> enum_decl -> code_item; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Func : 'd -> func_typ -> typ; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; + visit_IntermediateText : 'd -> string -> law_structure; + visit_KDate : 'd -> op_kind; visit_KDec : 'd -> op_kind; + visit_KDuration : 'd -> op_kind; visit_KInt : 'd -> op_kind; + visit_KMoney : 'd -> op_kind; visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_LawArticle : 'd -> + law_article -> + law_article_item list -> law_structure; + visit_LawHeading : 'd -> + law_heading -> law_structure list -> law_structure; + visit_LawInclude : 'd -> law_include -> law_structure; + visit_LawText : 'd -> string -> law_article_item; + visit_LegislativeText : 'd -> string Utils.Pos.marked -> law_include; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item; + visit_MetadataBlock : 'd -> + code_block -> + string Utils.Pos.marked -> law_structure; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_PdfFile : 'd -> + string Utils.Pos.marked -> int option -> law_include; + visit_Percent : 'd -> literal_unit; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Rule : 'd -> rule -> scope_use_item; + visit_ScopeDecl : 'd -> scope_decl -> code_item; + visit_ScopeUse : 'd -> scope_use -> code_item; + visit_StructDecl : 'd -> struct_decl -> code_item; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_code_block : 'd -> + code_item Utils.Pos.marked list -> + code_item Utils.Pos.marked list; + visit_code_item : 'd -> code_item -> code_item; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_enum_decl : 'd -> enum_decl -> enum_decl; + visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_law_article : 'd -> law_article -> law_article; + visit_law_article_item : 'd -> law_article_item -> law_article_item; + visit_law_heading : 'd -> law_heading -> law_heading; + visit_law_include : 'd -> law_include -> law_include; + visit_law_structure : 'd -> law_structure -> law_structure; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; + visit_scope_decl : 'd -> scope_decl -> scope_decl; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_scope_decl_context_item : 'd -> + scope_decl_context_item -> + scope_decl_context_item; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + visit_scope_use : 'd -> scope_use -> scope_use; + visit_scope_use_item : 'd -> scope_use_item -> scope_use_item; + visit_source_repr : 'd -> + string Utils.Pos.marked -> + string Utils.Pos.marked; + visit_struct_decl : 'd -> struct_decl -> struct_decl; + visit_struct_decl_field : 'd -> + struct_decl_field -> struct_decl_field; + visit_typ : 'd -> typ -> typ; visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Assertion : 'd -> assertion -> scope_use_item + method visit_Base : 'd -> base_typ -> typ + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CatalaFile : 'd -> string Utils.Pos.marked -> law_include + method visit_CodeBlock : + 'd -> code_block -> string Utils.Pos.marked -> law_article_item + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Condition : 'd -> base_typ + method visit_ContextData : + 'd -> scope_decl_context_data -> scope_decl_context_item + method visit_ContextScope : + 'd -> scope_decl_context_scope -> scope_decl_context_item + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Definition : 'd -> definition -> scope_use_item + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumDecl : 'd -> enum_decl -> code_item + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Func : 'd -> func_typ -> typ + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_IntermediateText : 'd -> string -> law_structure + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_LawArticle : + 'd -> law_article -> law_article_item list -> law_structure + method visit_LawHeading : + 'd -> law_heading -> law_structure list -> law_structure + method visit_LawInclude : 'd -> law_include -> law_structure + method visit_LawText : 'd -> string -> law_article_item + method visit_LegislativeText : + 'd -> string Utils.Pos.marked -> law_include + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item + method visit_MetadataBlock : + 'd -> code_block -> string Utils.Pos.marked -> law_structure + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_PdfFile : + 'd -> string Utils.Pos.marked -> int option -> law_include + method visit_Percent : 'd -> literal_unit + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Rule : 'd -> rule -> scope_use_item + method visit_ScopeDecl : 'd -> scope_decl -> code_item + method visit_ScopeUse : 'd -> scope_use -> code_item + method visit_StructDecl : 'd -> struct_decl -> code_item + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_code_block : + 'd -> + code_item Utils.Pos.marked list -> code_item Utils.Pos.marked list + method visit_code_item : 'd -> code_item -> code_item + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_enum_decl : 'd -> enum_decl -> enum_decl + method visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method visit_law_article : 'd -> law_article -> law_article + method visit_law_article_item : + 'd -> law_article_item -> law_article_item + method visit_law_heading : 'd -> law_heading -> law_heading + method visit_law_include : 'd -> law_include -> law_include + method visit_law_structure : 'd -> law_structure -> law_structure + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method visit_scope_decl : 'd -> scope_decl -> scope_decl + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method visit_scope_decl_context_item : + 'd -> scope_decl_context_item -> scope_decl_context_item + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method visit_scope_use : 'd -> scope_use -> scope_use + method visit_scope_use_item : 'd -> scope_use_item -> scope_use_item + method visit_source_repr : + 'd -> string Utils.Pos.marked -> string Utils.Pos.marked + method private visit_string : 'env. 'env -> string -> string + method visit_struct_decl : 'd -> struct_decl -> struct_decl + method visit_struct_decl_field : + 'd -> struct_decl_field -> struct_decl_field + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] law_structure_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Assertion : 'c -> assertion -> unit; + visit_Base : 'c -> base_typ -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CatalaFile : 'c -> string Utils.Pos.marked -> unit; + visit_CodeBlock : 'c -> code_block -> string Utils.Pos.marked -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_ContextData : 'c -> scope_decl_context_data -> unit; + visit_ContextScope : 'c -> scope_decl_context_scope -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Day : 'c -> unit; visit_Dec : 'c -> Z.t -> Z.t -> unit; + visit_Decimal : 'c -> unit; visit_Decreasing : 'c -> unit; + visit_Definition : 'c -> definition -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumDecl : 'c -> enum_decl -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Func : 'c -> func_typ -> unit; visit_GetDay : 'c -> unit; + visit_GetMonth : 'c -> unit; visit_GetYear : 'c -> unit; + visit_Gt : 'c -> op_kind -> unit; visit_Gte : 'c -> op_kind -> unit; + visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_IntermediateText : 'c -> string -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_LawArticle : 'c -> law_article -> law_article_item list -> unit; + visit_LawHeading : 'c -> law_heading -> law_structure list -> unit; + visit_LawInclude : 'c -> law_include -> unit; + visit_LawText : 'c -> string -> unit; + visit_LegislativeText : 'c -> string Utils.Pos.marked -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_MetaAssertion : 'c -> meta_assertion -> unit; + visit_MetadataBlock : 'c -> + code_block -> string Utils.Pos.marked -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; + visit_PdfFile : 'c -> string Utils.Pos.marked -> int option -> unit; + visit_Percent : 'c -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Rule : 'c -> rule -> unit; + visit_ScopeDecl : 'c -> scope_decl -> unit; + visit_ScopeUse : 'c -> scope_use -> unit; + visit_StructDecl : 'c -> struct_decl -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit; + visit_code_item : 'c -> code_item -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_enum_decl : 'c -> enum_decl -> unit; + visit_enum_decl_case : 'c -> enum_decl_case -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_law_article : 'c -> law_article -> unit; + visit_law_article_item : 'c -> law_article_item -> unit; + visit_law_heading : 'c -> law_heading -> unit; + visit_law_include : 'c -> law_include -> unit; + visit_law_structure : 'c -> law_structure -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; + visit_scope_decl : 'c -> scope_decl -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_scope_decl_context_item : 'c -> scope_decl_context_item -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + visit_scope_use : 'c -> scope_use -> unit; + visit_scope_use_item : 'c -> scope_use_item -> unit; + visit_source_repr : 'c -> string Utils.Pos.marked -> unit; + visit_struct_decl : 'c -> struct_decl -> unit; + visit_struct_decl_field : 'c -> struct_decl_field -> unit; + visit_typ : 'c -> typ -> unit; visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Assertion : 'c -> assertion -> unit + method visit_Base : 'c -> base_typ -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CatalaFile : 'c -> string Utils.Pos.marked -> unit + method visit_CodeBlock : + 'c -> code_block -> string Utils.Pos.marked -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_ContextData : 'c -> scope_decl_context_data -> unit + method visit_ContextScope : 'c -> scope_decl_context_scope -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Definition : 'c -> definition -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumDecl : 'c -> enum_decl -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_IntermediateText : 'c -> string -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_LawArticle : + 'c -> law_article -> law_article_item list -> unit + method visit_LawHeading : 'c -> law_heading -> law_structure list -> unit + method visit_LawInclude : 'c -> law_include -> unit + method visit_LawText : 'c -> string -> unit + method visit_LegislativeText : 'c -> string Utils.Pos.marked -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_MetaAssertion : 'c -> meta_assertion -> unit + method visit_MetadataBlock : + 'c -> code_block -> string Utils.Pos.marked -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_PdfFile : + 'c -> string Utils.Pos.marked -> int option -> unit + method visit_Percent : 'c -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Rule : 'c -> rule -> unit + method visit_ScopeDecl : 'c -> scope_decl -> unit + method visit_ScopeUse : 'c -> scope_use -> unit + method visit_StructDecl : 'c -> struct_decl -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit + method visit_code_item : 'c -> code_item -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_enum_decl : 'c -> enum_decl -> unit + method visit_enum_decl_case : 'c -> enum_decl_case -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method visit_law_article : 'c -> law_article -> unit + method visit_law_article_item : 'c -> law_article_item -> unit + method visit_law_heading : 'c -> law_heading -> unit + method visit_law_include : 'c -> law_include -> unit + method visit_law_structure : 'c -> law_structure -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method visit_scope_decl : 'c -> scope_decl -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method visit_scope_decl_context_item : + 'c -> scope_decl_context_item -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method visit_scope_use : 'c -> scope_use -> unit + method visit_scope_use_item : 'c -> scope_use_item -> unit + method visit_source_repr : 'c -> string Utils.Pos.marked -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_struct_decl : 'c -> struct_decl -> unit + method visit_struct_decl_field : 'c -> struct_decl_field -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type program_item = LawStructure of law_structure +class virtual ['c] program_item_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Assertion : 'd -> assertion -> scope_use_item; + visit_Base : 'd -> base_typ -> typ; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CatalaFile : 'd -> string Utils.Pos.marked -> law_include; + visit_CodeBlock : 'd -> + code_block -> + string Utils.Pos.marked -> law_article_item; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Condition : 'd -> base_typ; + visit_ContextData : 'd -> + scope_decl_context_data -> + scope_decl_context_item; + visit_ContextScope : 'd -> + scope_decl_context_scope -> + scope_decl_context_item; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Definition : 'd -> definition -> scope_use_item; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumDecl : 'd -> enum_decl -> code_item; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Func : 'd -> func_typ -> typ; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; + visit_IntermediateText : 'd -> string -> law_structure; + visit_KDate : 'd -> op_kind; visit_KDec : 'd -> op_kind; + visit_KDuration : 'd -> op_kind; visit_KInt : 'd -> op_kind; + visit_KMoney : 'd -> op_kind; visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_LawArticle : 'd -> + law_article -> + law_article_item list -> law_structure; + visit_LawHeading : 'd -> + law_heading -> law_structure list -> law_structure; + visit_LawInclude : 'd -> law_include -> law_structure; + visit_LawStructure : 'd -> law_structure -> program_item; + visit_LawText : 'd -> string -> law_article_item; + visit_LegislativeText : 'd -> string Utils.Pos.marked -> law_include; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item; + visit_MetadataBlock : 'd -> + code_block -> + string Utils.Pos.marked -> law_structure; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_PdfFile : 'd -> + string Utils.Pos.marked -> int option -> law_include; + visit_Percent : 'd -> literal_unit; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Rule : 'd -> rule -> scope_use_item; + visit_ScopeDecl : 'd -> scope_decl -> code_item; + visit_ScopeUse : 'd -> scope_use -> code_item; + visit_StructDecl : 'd -> struct_decl -> code_item; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_code_block : 'd -> + code_item Utils.Pos.marked list -> + code_item Utils.Pos.marked list; + visit_code_item : 'd -> code_item -> code_item; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_enum_decl : 'd -> enum_decl -> enum_decl; + visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_law_article : 'd -> law_article -> law_article; + visit_law_article_item : 'd -> law_article_item -> law_article_item; + visit_law_heading : 'd -> law_heading -> law_heading; + visit_law_include : 'd -> law_include -> law_include; + visit_law_structure : 'd -> law_structure -> law_structure; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_program_item : 'd -> program_item -> program_item; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; + visit_scope_decl : 'd -> scope_decl -> scope_decl; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_scope_decl_context_item : 'd -> + scope_decl_context_item -> + scope_decl_context_item; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + visit_scope_use : 'd -> scope_use -> scope_use; + visit_scope_use_item : 'd -> scope_use_item -> scope_use_item; + visit_source_repr : 'd -> + string Utils.Pos.marked -> + string Utils.Pos.marked; + visit_struct_decl : 'd -> struct_decl -> struct_decl; + visit_struct_decl_field : 'd -> + struct_decl_field -> struct_decl_field; + visit_typ : 'd -> typ -> typ; visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Assertion : 'd -> assertion -> scope_use_item + method visit_Base : 'd -> base_typ -> typ + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CatalaFile : 'd -> string Utils.Pos.marked -> law_include + method visit_CodeBlock : + 'd -> code_block -> string Utils.Pos.marked -> law_article_item + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Condition : 'd -> base_typ + method visit_ContextData : + 'd -> scope_decl_context_data -> scope_decl_context_item + method visit_ContextScope : + 'd -> scope_decl_context_scope -> scope_decl_context_item + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Definition : 'd -> definition -> scope_use_item + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumDecl : 'd -> enum_decl -> code_item + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Func : 'd -> func_typ -> typ + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_IntermediateText : 'd -> string -> law_structure + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_LawArticle : + 'd -> law_article -> law_article_item list -> law_structure + method visit_LawHeading : + 'd -> law_heading -> law_structure list -> law_structure + method visit_LawInclude : 'd -> law_include -> law_structure + method visit_LawStructure : 'd -> law_structure -> program_item + method visit_LawText : 'd -> string -> law_article_item + method visit_LegislativeText : + 'd -> string Utils.Pos.marked -> law_include + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item + method visit_MetadataBlock : + 'd -> code_block -> string Utils.Pos.marked -> law_structure + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_PdfFile : + 'd -> string Utils.Pos.marked -> int option -> law_include + method visit_Percent : 'd -> literal_unit + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Rule : 'd -> rule -> scope_use_item + method visit_ScopeDecl : 'd -> scope_decl -> code_item + method visit_ScopeUse : 'd -> scope_use -> code_item + method visit_StructDecl : 'd -> struct_decl -> code_item + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_code_block : + 'd -> + code_item Utils.Pos.marked list -> code_item Utils.Pos.marked list + method visit_code_item : 'd -> code_item -> code_item + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_enum_decl : 'd -> enum_decl -> enum_decl + method visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method visit_law_article : 'd -> law_article -> law_article + method visit_law_article_item : + 'd -> law_article_item -> law_article_item + method visit_law_heading : 'd -> law_heading -> law_heading + method visit_law_include : 'd -> law_include -> law_include + method visit_law_structure : 'd -> law_structure -> law_structure + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_program_item : 'd -> program_item -> program_item + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method visit_scope_decl : 'd -> scope_decl -> scope_decl + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method visit_scope_decl_context_item : + 'd -> scope_decl_context_item -> scope_decl_context_item + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method visit_scope_use : 'd -> scope_use -> scope_use + method visit_scope_use_item : 'd -> scope_use_item -> scope_use_item + method visit_source_repr : + 'd -> string Utils.Pos.marked -> string Utils.Pos.marked + method private visit_string : 'env. 'env -> string -> string + method visit_struct_decl : 'd -> struct_decl -> struct_decl + method visit_struct_decl_field : + 'd -> struct_decl_field -> struct_decl_field + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] program_item_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Assertion : 'c -> assertion -> unit; + visit_Base : 'c -> base_typ -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CatalaFile : 'c -> string Utils.Pos.marked -> unit; + visit_CodeBlock : 'c -> code_block -> string Utils.Pos.marked -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_ContextData : 'c -> scope_decl_context_data -> unit; + visit_ContextScope : 'c -> scope_decl_context_scope -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Day : 'c -> unit; visit_Dec : 'c -> Z.t -> Z.t -> unit; + visit_Decimal : 'c -> unit; visit_Decreasing : 'c -> unit; + visit_Definition : 'c -> definition -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumDecl : 'c -> enum_decl -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Func : 'c -> func_typ -> unit; visit_GetDay : 'c -> unit; + visit_GetMonth : 'c -> unit; visit_GetYear : 'c -> unit; + visit_Gt : 'c -> op_kind -> unit; visit_Gte : 'c -> op_kind -> unit; + visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_IntermediateText : 'c -> string -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_LawArticle : 'c -> law_article -> law_article_item list -> unit; + visit_LawHeading : 'c -> law_heading -> law_structure list -> unit; + visit_LawInclude : 'c -> law_include -> unit; + visit_LawStructure : 'c -> law_structure -> unit; + visit_LawText : 'c -> string -> unit; + visit_LegislativeText : 'c -> string Utils.Pos.marked -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_MetaAssertion : 'c -> meta_assertion -> unit; + visit_MetadataBlock : 'c -> + code_block -> string Utils.Pos.marked -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; + visit_PdfFile : 'c -> string Utils.Pos.marked -> int option -> unit; + visit_Percent : 'c -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Rule : 'c -> rule -> unit; + visit_ScopeDecl : 'c -> scope_decl -> unit; + visit_ScopeUse : 'c -> scope_use -> unit; + visit_StructDecl : 'c -> struct_decl -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit; + visit_code_item : 'c -> code_item -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_enum_decl : 'c -> enum_decl -> unit; + visit_enum_decl_case : 'c -> enum_decl_case -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_law_article : 'c -> law_article -> unit; + visit_law_article_item : 'c -> law_article_item -> unit; + visit_law_heading : 'c -> law_heading -> unit; + visit_law_include : 'c -> law_include -> unit; + visit_law_structure : 'c -> law_structure -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_program_item : 'c -> program_item -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; + visit_scope_decl : 'c -> scope_decl -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_scope_decl_context_item : 'c -> scope_decl_context_item -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + visit_scope_use : 'c -> scope_use -> unit; + visit_scope_use_item : 'c -> scope_use_item -> unit; + visit_source_repr : 'c -> string Utils.Pos.marked -> unit; + visit_struct_decl : 'c -> struct_decl -> unit; + visit_struct_decl_field : 'c -> struct_decl_field -> unit; + visit_typ : 'c -> typ -> unit; visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Assertion : 'c -> assertion -> unit + method visit_Base : 'c -> base_typ -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CatalaFile : 'c -> string Utils.Pos.marked -> unit + method visit_CodeBlock : + 'c -> code_block -> string Utils.Pos.marked -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_ContextData : 'c -> scope_decl_context_data -> unit + method visit_ContextScope : 'c -> scope_decl_context_scope -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Definition : 'c -> definition -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumDecl : 'c -> enum_decl -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_IntermediateText : 'c -> string -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_LawArticle : + 'c -> law_article -> law_article_item list -> unit + method visit_LawHeading : 'c -> law_heading -> law_structure list -> unit + method visit_LawInclude : 'c -> law_include -> unit + method visit_LawStructure : 'c -> law_structure -> unit + method visit_LawText : 'c -> string -> unit + method visit_LegislativeText : 'c -> string Utils.Pos.marked -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_MetaAssertion : 'c -> meta_assertion -> unit + method visit_MetadataBlock : + 'c -> code_block -> string Utils.Pos.marked -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_PdfFile : + 'c -> string Utils.Pos.marked -> int option -> unit + method visit_Percent : 'c -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Rule : 'c -> rule -> unit + method visit_ScopeDecl : 'c -> scope_decl -> unit + method visit_ScopeUse : 'c -> scope_use -> unit + method visit_StructDecl : 'c -> struct_decl -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit + method visit_code_item : 'c -> code_item -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_enum_decl : 'c -> enum_decl -> unit + method visit_enum_decl_case : 'c -> enum_decl_case -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method visit_law_article : 'c -> law_article -> unit + method visit_law_article_item : 'c -> law_article_item -> unit + method visit_law_heading : 'c -> law_heading -> unit + method visit_law_include : 'c -> law_include -> unit + method visit_law_structure : 'c -> law_structure -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_program_item : 'c -> program_item -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method visit_scope_decl : 'c -> scope_decl -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method visit_scope_decl_context_item : + 'c -> scope_decl_context_item -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method visit_scope_use : 'c -> scope_use -> unit + method visit_scope_use_item : 'c -> scope_use_item -> unit + method visit_source_repr : 'c -> string Utils.Pos.marked -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_struct_decl : 'c -> struct_decl -> unit + method visit_struct_decl_field : 'c -> struct_decl_field -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type program = { + program_items : program_item list; + program_source_files : string list; +} +class virtual ['c] program_map : + object ('c) + constraint 'c = + < visit_Add : 'd -> op_kind -> binop; + visit_Aggregate : 'd -> aggregate_func -> collection_op; + visit_AggregateArgExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateCount : 'd -> aggregate_func; + visit_AggregateExtremum : 'd -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> + aggregate_func; + visit_AggregateSum : 'd -> primitive_typ -> aggregate_func; + visit_And : 'd -> binop; + visit_ArrayLit : 'd -> expression Utils.Pos.marked list -> expression; + visit_Assertion : 'd -> assertion -> scope_use_item; + visit_Base : 'd -> base_typ -> typ; + visit_Binop : 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Boolean : 'd -> primitive_typ; + visit_Builtin : 'd -> builtin_expression -> expression; + visit_Cardinal : 'd -> builtin_expression; + visit_CatalaFile : 'd -> string Utils.Pos.marked -> law_include; + visit_CodeBlock : 'd -> + code_block -> + string Utils.Pos.marked -> law_article_item; + visit_Collection : 'd -> + base_typ_data Utils.Pos.marked -> base_typ_data; + visit_CollectionOp : 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Condition : 'd -> base_typ; + visit_ContextData : 'd -> + scope_decl_context_data -> + scope_decl_context_item; + visit_ContextScope : 'd -> + scope_decl_context_scope -> + scope_decl_context_item; + visit_Data : 'd -> base_typ_data -> base_typ; + visit_Date : 'd -> primitive_typ; visit_Day : 'd -> literal_unit; + visit_Dec : 'd -> Z.t -> Z.t -> literal_number; + visit_Decimal : 'd -> primitive_typ; + visit_Decreasing : 'd -> variation_typ; + visit_Definition : 'd -> definition -> scope_use_item; + visit_Div : 'd -> op_kind -> binop; + visit_Dotted : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression; + visit_Duration : 'd -> primitive_typ; + visit_EnumDecl : 'd -> enum_decl -> code_item; + visit_EnumInject : 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression; + visit_EnumProject : 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression; + visit_Eq : 'd -> binop; + visit_ExceptionToLabel : 'd -> ident Utils.Pos.marked -> exception_to; + visit_Exists : 'd -> collection_op; + visit_Filter : 'd -> collection_op; + visit_FixedBy : 'd -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> meta_assertion; + visit_Forall : 'd -> collection_op; + visit_FunCall : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Func : 'd -> func_typ -> typ; + visit_GetDay : 'd -> builtin_expression; + visit_GetMonth : 'd -> builtin_expression; + visit_GetYear : 'd -> builtin_expression; + visit_Gt : 'd -> op_kind -> binop; + visit_Gte : 'd -> op_kind -> binop; + visit_Ident : 'd -> ident -> expression; + visit_IfThenElse : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_Increasing : 'd -> variation_typ; + visit_Int : 'd -> Z.t -> literal_number; + visit_IntToDec : 'd -> builtin_expression; + visit_Integer : 'd -> primitive_typ; + visit_IntermediateText : 'd -> string -> law_structure; + visit_KDate : 'd -> op_kind; visit_KDec : 'd -> op_kind; + visit_KDuration : 'd -> op_kind; visit_KInt : 'd -> op_kind; + visit_KMoney : 'd -> op_kind; visit_LBool : 'd -> bool -> literal; + visit_LDate : 'd -> literal_date -> literal; + visit_LMoneyAmount : 'd -> money_amount -> literal; + visit_LNumber : 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal; + visit_LawArticle : 'd -> + law_article -> + law_article_item list -> law_structure; + visit_LawHeading : 'd -> + law_heading -> law_structure list -> law_structure; + visit_LawInclude : 'd -> law_include -> law_structure; + visit_LawStructure : 'd -> law_structure -> program_item; + visit_LawText : 'd -> string -> law_article_item; + visit_LegislativeText : 'd -> string Utils.Pos.marked -> law_include; + visit_Literal : 'd -> literal -> expression; + visit_Lt : 'd -> op_kind -> binop; + visit_Lte : 'd -> op_kind -> binop; visit_Map : 'd -> collection_op; + visit_MatchWith : 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression; + visit_MemCollection : 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item; + visit_MetadataBlock : 'd -> + code_block -> + string Utils.Pos.marked -> law_structure; + visit_Minus : 'd -> op_kind -> unop; + visit_Money : 'd -> primitive_typ; visit_Month : 'd -> literal_unit; + visit_Mult : 'd -> op_kind -> binop; + visit_Named : 'd -> constructor -> primitive_typ; + visit_Neq : 'd -> binop; visit_Not : 'd -> unop; + visit_NotAnException : 'd -> exception_to; visit_Or : 'd -> binop; + visit_PdfFile : 'd -> + string Utils.Pos.marked -> int option -> law_include; + visit_Percent : 'd -> literal_unit; + visit_Primitive : 'd -> primitive_typ -> base_typ_data; + visit_Rule : 'd -> rule -> scope_use_item; + visit_ScopeDecl : 'd -> scope_decl -> code_item; + visit_ScopeUse : 'd -> scope_use -> code_item; + visit_StructDecl : 'd -> struct_decl -> code_item; + visit_StructLit : 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> expression; + visit_Sub : 'd -> op_kind -> binop; + visit_TestMatchCase : 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> + expression; + visit_Text : 'd -> primitive_typ; + visit_UnlabeledException : 'd -> exception_to; + visit_Unop : 'd -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression; + visit_VariesWith : 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> + meta_assertion; + visit_Year : 'd -> literal_unit; + visit_aggregate_func : 'd -> aggregate_func -> aggregate_func; + visit_assertion : 'd -> assertion -> assertion; + visit_base_typ : 'd -> base_typ -> base_typ; + visit_base_typ_data : 'd -> base_typ_data -> base_typ_data; + visit_binop : 'd -> binop -> binop; + visit_builtin_expression : 'd -> + builtin_expression -> builtin_expression; + visit_code_block : 'd -> + code_item Utils.Pos.marked list -> + code_item Utils.Pos.marked list; + visit_code_item : 'd -> code_item -> code_item; + visit_collection_op : 'd -> collection_op -> collection_op; + visit_constructor : 'd -> constructor -> constructor; + visit_definition : 'd -> definition -> definition; + visit_enum_decl : 'd -> enum_decl -> enum_decl; + visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case; + visit_exception_to : 'd -> exception_to -> exception_to; + visit_expression : 'd -> expression -> expression; + visit_func_typ : 'd -> func_typ -> func_typ; + visit_ident : 'd -> ident -> ident; + visit_law_article : 'd -> law_article -> law_article; + visit_law_article_item : 'd -> law_article_item -> law_article_item; + visit_law_heading : 'd -> law_heading -> law_heading; + visit_law_include : 'd -> law_include -> law_include; + visit_law_structure : 'd -> law_structure -> law_structure; + visit_literal : 'd -> literal -> literal; + visit_literal_date : 'd -> literal_date -> literal_date; + visit_literal_number : 'd -> literal_number -> literal_number; + visit_literal_unit : 'd -> literal_unit -> literal_unit; + visit_marked : 'a. + ('d -> 'a -> 'a) -> + 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked; + visit_match_case : 'd -> match_case -> match_case; + visit_match_case_pattern : 'd -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option; + visit_match_cases : 'd -> match_cases -> match_cases; + visit_meta_assertion : 'd -> meta_assertion -> meta_assertion; + visit_money_amount : 'd -> money_amount -> money_amount; + visit_op_kind : 'd -> op_kind -> op_kind; + visit_primitive_typ : 'd -> primitive_typ -> primitive_typ; + visit_program : 'd -> program -> program; + visit_program_item : 'd -> program_item -> program_item; + visit_qident : 'd -> + ident Utils.Pos.marked list -> + ident Utils.Pos.marked list; + visit_rule : 'd -> rule -> rule; + visit_scope_decl : 'd -> scope_decl -> scope_decl; + visit_scope_decl_context_data : 'd -> + scope_decl_context_data -> + scope_decl_context_data; + visit_scope_decl_context_item : 'd -> + scope_decl_context_item -> + scope_decl_context_item; + visit_scope_decl_context_scope : 'd -> + scope_decl_context_scope -> + scope_decl_context_scope; + visit_scope_use : 'd -> scope_use -> scope_use; + visit_scope_use_item : 'd -> scope_use_item -> scope_use_item; + visit_source_repr : 'd -> + string Utils.Pos.marked -> + string Utils.Pos.marked; + visit_struct_decl : 'd -> struct_decl -> struct_decl; + visit_struct_decl_field : 'd -> + struct_decl_field -> struct_decl_field; + visit_typ : 'd -> typ -> typ; visit_unop : 'd -> unop -> unop; + visit_variation_typ : 'd -> variation_typ -> variation_typ; .. > + method visit_Add : 'd -> op_kind -> binop + method visit_Aggregate : 'd -> aggregate_func -> collection_op + method visit_AggregateArgExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateCount : 'd -> aggregate_func + method visit_AggregateExtremum : + 'd -> + bool -> primitive_typ -> expression Utils.Pos.marked -> aggregate_func + method visit_AggregateSum : 'd -> primitive_typ -> aggregate_func + method visit_And : 'd -> binop + method visit_ArrayLit : + 'd -> expression Utils.Pos.marked list -> expression + method visit_Assertion : 'd -> assertion -> scope_use_item + method visit_Base : 'd -> base_typ -> typ + method visit_Binop : + 'd -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Boolean : 'd -> primitive_typ + method visit_Builtin : 'd -> builtin_expression -> expression + method visit_Cardinal : 'd -> builtin_expression + method visit_CatalaFile : 'd -> string Utils.Pos.marked -> law_include + method visit_CodeBlock : + 'd -> code_block -> string Utils.Pos.marked -> law_article_item + method visit_Collection : + 'd -> base_typ_data Utils.Pos.marked -> base_typ_data + method visit_CollectionOp : + 'd -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Condition : 'd -> base_typ + method visit_ContextData : + 'd -> scope_decl_context_data -> scope_decl_context_item + method visit_ContextScope : + 'd -> scope_decl_context_scope -> scope_decl_context_item + method visit_Data : 'd -> base_typ_data -> base_typ + method visit_Date : 'd -> primitive_typ + method visit_Day : 'd -> literal_unit + method visit_Dec : 'd -> Z.t -> Z.t -> literal_number + method visit_Decimal : 'd -> primitive_typ + method visit_Decreasing : 'd -> variation_typ + method visit_Definition : 'd -> definition -> scope_use_item + method visit_Div : 'd -> op_kind -> binop + method visit_Dotted : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> expression + method visit_Duration : 'd -> primitive_typ + method visit_EnumDecl : 'd -> enum_decl -> code_item + method visit_EnumInject : + 'd -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> expression + method visit_EnumProject : + 'd -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> expression + method visit_Eq : 'd -> binop + method visit_ExceptionToLabel : + 'd -> ident Utils.Pos.marked -> exception_to + method visit_Exists : 'd -> collection_op + method visit_Filter : 'd -> collection_op + method visit_FixedBy : + 'd -> + qident Utils.Pos.marked -> ident Utils.Pos.marked -> meta_assertion + method visit_Forall : 'd -> collection_op + method visit_FunCall : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Func : 'd -> func_typ -> typ + method visit_GetDay : 'd -> builtin_expression + method visit_GetMonth : 'd -> builtin_expression + method visit_GetYear : 'd -> builtin_expression + method visit_Gt : 'd -> op_kind -> binop + method visit_Gte : 'd -> op_kind -> binop + method visit_Ident : 'd -> ident -> expression + method visit_IfThenElse : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_Increasing : 'd -> variation_typ + method visit_Int : 'd -> Z.t -> literal_number + method visit_IntToDec : 'd -> builtin_expression + method visit_Integer : 'd -> primitive_typ + method visit_IntermediateText : 'd -> string -> law_structure + method visit_KDate : 'd -> op_kind + method visit_KDec : 'd -> op_kind + method visit_KDuration : 'd -> op_kind + method visit_KInt : 'd -> op_kind + method visit_KMoney : 'd -> op_kind + method visit_LBool : 'd -> bool -> literal + method visit_LDate : 'd -> literal_date -> literal + method visit_LMoneyAmount : 'd -> money_amount -> literal + method visit_LNumber : + 'd -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> literal + method visit_LawArticle : + 'd -> law_article -> law_article_item list -> law_structure + method visit_LawHeading : + 'd -> law_heading -> law_structure list -> law_structure + method visit_LawInclude : 'd -> law_include -> law_structure + method visit_LawStructure : 'd -> law_structure -> program_item + method visit_LawText : 'd -> string -> law_article_item + method visit_LegislativeText : + 'd -> string Utils.Pos.marked -> law_include + method visit_Literal : 'd -> literal -> expression + method visit_Lt : 'd -> op_kind -> binop + method visit_Lte : 'd -> op_kind -> binop + method visit_Map : 'd -> collection_op + method visit_MatchWith : + 'd -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> expression + method visit_MemCollection : + 'd -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression + method visit_MetaAssertion : 'd -> meta_assertion -> scope_use_item + method visit_MetadataBlock : + 'd -> code_block -> string Utils.Pos.marked -> law_structure + method visit_Minus : 'd -> op_kind -> unop + method visit_Money : 'd -> primitive_typ + method visit_Month : 'd -> literal_unit + method visit_Mult : 'd -> op_kind -> binop + method visit_Named : 'd -> constructor -> primitive_typ + method visit_Neq : 'd -> binop + method visit_Not : 'd -> unop + method visit_NotAnException : 'd -> exception_to + method visit_Or : 'd -> binop + method visit_PdfFile : + 'd -> string Utils.Pos.marked -> int option -> law_include + method visit_Percent : 'd -> literal_unit + method visit_Primitive : 'd -> primitive_typ -> base_typ_data + method visit_Rule : 'd -> rule -> scope_use_item + method visit_ScopeDecl : 'd -> scope_decl -> code_item + method visit_ScopeUse : 'd -> scope_use -> code_item + method visit_StructDecl : 'd -> struct_decl -> code_item + method visit_StructLit : + 'd -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> + expression + method visit_Sub : 'd -> op_kind -> binop + method visit_TestMatchCase : + 'd -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> expression + method visit_Text : 'd -> primitive_typ + method visit_UnlabeledException : 'd -> exception_to + method visit_Unop : + 'd -> + unop Utils.Pos.marked -> expression Utils.Pos.marked -> expression + method visit_VariesWith : + 'd -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> meta_assertion + method visit_Year : 'd -> literal_unit + method visit_aggregate_func : 'd -> aggregate_func -> aggregate_func + method private visit_array : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a array -> 'b array + method visit_assertion : 'd -> assertion -> assertion + method visit_base_typ : 'd -> base_typ -> base_typ + method visit_base_typ_data : 'd -> base_typ_data -> base_typ_data + method visit_binop : 'd -> binop -> binop + method private visit_bool : 'env. 'env -> bool -> bool + method visit_builtin_expression : + 'd -> builtin_expression -> builtin_expression + method private visit_bytes : 'env. 'env -> bytes -> bytes + method private visit_char : 'env. 'env -> char -> char + method visit_code_block : + 'd -> + code_item Utils.Pos.marked list -> code_item Utils.Pos.marked list + method visit_code_item : 'd -> code_item -> code_item + method visit_collection_op : 'd -> collection_op -> collection_op + method visit_constructor : 'd -> constructor -> constructor + method visit_definition : 'd -> definition -> definition + method visit_enum_decl : 'd -> enum_decl -> enum_decl + method visit_enum_decl_case : 'd -> enum_decl_case -> enum_decl_case + method visit_exception_to : 'd -> exception_to -> exception_to + method visit_expression : 'd -> expression -> expression + method private visit_float : 'env. 'env -> float -> float + method visit_func_typ : 'd -> func_typ -> func_typ + method visit_ident : 'd -> ident -> ident + method private visit_int : 'env. 'env -> int -> int + method private visit_int32 : 'env. 'env -> int32 -> int32 + method private visit_int64 : 'env. 'env -> int64 -> int64 + method visit_law_article : 'd -> law_article -> law_article + method visit_law_article_item : + 'd -> law_article_item -> law_article_item + method visit_law_heading : 'd -> law_heading -> law_heading + method visit_law_include : 'd -> law_include -> law_include + method visit_law_structure : 'd -> law_structure -> law_structure + method private visit_lazy_t : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a Lazy.t -> 'b Lazy.t + method private visit_list : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a list -> 'b list + method visit_literal : 'd -> literal -> literal + method visit_literal_date : 'd -> literal_date -> literal_date + method visit_literal_number : 'd -> literal_number -> literal_number + method visit_literal_unit : 'd -> literal_unit -> literal_unit + method visit_marked : + ('d -> 'a -> 'a) -> 'd -> 'a Utils.Pos.marked -> 'a Utils.Pos.marked + method visit_match_case : 'd -> match_case -> match_case + method visit_match_case_pattern : + 'd -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option + method visit_match_cases : 'd -> match_cases -> match_cases + method visit_meta_assertion : 'd -> meta_assertion -> meta_assertion + method visit_money_amount : 'd -> money_amount -> money_amount + method private visit_nativeint : 'env. 'env -> nativeint -> nativeint + method visit_op_kind : 'd -> op_kind -> op_kind + method private visit_option : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a option -> 'b option + method visit_primitive_typ : 'd -> primitive_typ -> primitive_typ + method visit_program : 'd -> program -> program + method visit_program_item : 'd -> program_item -> program_item + method visit_qident : + 'd -> ident Utils.Pos.marked list -> ident Utils.Pos.marked list + method private visit_ref : + 'env 'a 'b. ('env -> 'a -> 'b) -> 'env -> 'a ref -> 'b ref + method private visit_result : + 'env 'a 'b 'e 'f. + ('env -> 'a -> 'b) -> + ('env -> 'e -> 'f) -> + 'env -> ('a, 'e) Result.result -> ('b, 'f) Result.result + method visit_rule : 'd -> rule -> rule + method visit_scope_decl : 'd -> scope_decl -> scope_decl + method visit_scope_decl_context_data : + 'd -> scope_decl_context_data -> scope_decl_context_data + method visit_scope_decl_context_item : + 'd -> scope_decl_context_item -> scope_decl_context_item + method visit_scope_decl_context_scope : + 'd -> scope_decl_context_scope -> scope_decl_context_scope + method visit_scope_use : 'd -> scope_use -> scope_use + method visit_scope_use_item : 'd -> scope_use_item -> scope_use_item + method visit_source_repr : + 'd -> string Utils.Pos.marked -> string Utils.Pos.marked + method private visit_string : 'env. 'env -> string -> string + method visit_struct_decl : 'd -> struct_decl -> struct_decl + method visit_struct_decl_field : + 'd -> struct_decl_field -> struct_decl_field + method visit_typ : 'd -> typ -> typ + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'd -> unop -> unop + method visit_variation_typ : 'd -> variation_typ -> variation_typ + end +class virtual ['b] program_iter : + object ('b) + constraint 'b = + < visit_Add : 'c -> op_kind -> unit; + visit_Aggregate : 'c -> aggregate_func -> unit; + visit_AggregateArgExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateCount : 'c -> unit; + visit_AggregateExtremum : 'c -> + bool -> + primitive_typ -> + expression Utils.Pos.marked -> unit; + visit_AggregateSum : 'c -> primitive_typ -> unit; + visit_And : 'c -> unit; + visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit; + visit_Assertion : 'c -> assertion -> unit; + visit_Base : 'c -> base_typ -> unit; + visit_Binop : 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Boolean : 'c -> unit; + visit_Builtin : 'c -> builtin_expression -> unit; + visit_Cardinal : 'c -> unit; + visit_CatalaFile : 'c -> string Utils.Pos.marked -> unit; + visit_CodeBlock : 'c -> code_block -> string Utils.Pos.marked -> unit; + visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit; + visit_CollectionOp : 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Condition : 'c -> unit; + visit_ContextData : 'c -> scope_decl_context_data -> unit; + visit_ContextScope : 'c -> scope_decl_context_scope -> unit; + visit_Data : 'c -> base_typ_data -> unit; visit_Date : 'c -> unit; + visit_Day : 'c -> unit; visit_Dec : 'c -> Z.t -> Z.t -> unit; + visit_Decimal : 'c -> unit; visit_Decreasing : 'c -> unit; + visit_Definition : 'c -> definition -> unit; + visit_Div : 'c -> op_kind -> unit; + visit_Dotted : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> + ident Utils.Pos.marked -> unit; + visit_Duration : 'c -> unit; + visit_EnumDecl : 'c -> enum_decl -> unit; + visit_EnumInject : 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit; + visit_EnumProject : 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked -> unit; + visit_Eq : 'c -> unit; + visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit; + visit_Exists : 'c -> unit; visit_Filter : 'c -> unit; + visit_FixedBy : 'c -> + qident Utils.Pos.marked -> + ident Utils.Pos.marked -> unit; + visit_Forall : 'c -> unit; + visit_FunCall : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Func : 'c -> func_typ -> unit; visit_GetDay : 'c -> unit; + visit_GetMonth : 'c -> unit; visit_GetYear : 'c -> unit; + visit_Gt : 'c -> op_kind -> unit; visit_Gte : 'c -> op_kind -> unit; + visit_Ident : 'c -> ident -> unit; + visit_IfThenElse : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_Increasing : 'c -> unit; visit_Int : 'c -> Z.t -> unit; + visit_IntToDec : 'c -> unit; visit_Integer : 'c -> unit; + visit_IntermediateText : 'c -> string -> unit; + visit_KDate : 'c -> unit; visit_KDec : 'c -> unit; + visit_KDuration : 'c -> unit; visit_KInt : 'c -> unit; + visit_KMoney : 'c -> unit; visit_LBool : 'c -> bool -> unit; + visit_LDate : 'c -> literal_date -> unit; + visit_LMoneyAmount : 'c -> money_amount -> unit; + visit_LNumber : 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit; + visit_LawArticle : 'c -> law_article -> law_article_item list -> unit; + visit_LawHeading : 'c -> law_heading -> law_structure list -> unit; + visit_LawInclude : 'c -> law_include -> unit; + visit_LawStructure : 'c -> law_structure -> unit; + visit_LawText : 'c -> string -> unit; + visit_LegislativeText : 'c -> string Utils.Pos.marked -> unit; + visit_Literal : 'c -> literal -> unit; + visit_Lt : 'c -> op_kind -> unit; visit_Lte : 'c -> op_kind -> unit; + visit_Map : 'c -> unit; + visit_MatchWith : 'c -> + expression Utils.Pos.marked -> + match_cases Utils.Pos.marked -> unit; + visit_MemCollection : 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_MetaAssertion : 'c -> meta_assertion -> unit; + visit_MetadataBlock : 'c -> + code_block -> string Utils.Pos.marked -> unit; + visit_Minus : 'c -> op_kind -> unit; visit_Money : 'c -> unit; + visit_Month : 'c -> unit; visit_Mult : 'c -> op_kind -> unit; + visit_Named : 'c -> constructor -> unit; visit_Neq : 'c -> unit; + visit_Not : 'c -> unit; visit_NotAnException : 'c -> unit; + visit_Or : 'c -> unit; + visit_PdfFile : 'c -> string Utils.Pos.marked -> int option -> unit; + visit_Percent : 'c -> unit; + visit_Primitive : 'c -> primitive_typ -> unit; + visit_Rule : 'c -> rule -> unit; + visit_ScopeDecl : 'c -> scope_decl -> unit; + visit_ScopeUse : 'c -> scope_use -> unit; + visit_StructDecl : 'c -> struct_decl -> unit; + visit_StructLit : 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * + expression Utils.Pos.marked) + list -> unit; + visit_Sub : 'c -> op_kind -> unit; + visit_TestMatchCase : 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit; + visit_Text : 'c -> unit; visit_UnlabeledException : 'c -> unit; + visit_Unop : 'c -> + unop Utils.Pos.marked -> + expression Utils.Pos.marked -> unit; + visit_VariesWith : 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit; + visit_Year : 'c -> unit; + visit_aggregate_func : 'c -> aggregate_func -> unit; + visit_assertion : 'c -> assertion -> unit; + visit_base_typ : 'c -> base_typ -> unit; + visit_base_typ_data : 'c -> base_typ_data -> unit; + visit_binop : 'c -> binop -> unit; + visit_builtin_expression : 'c -> builtin_expression -> unit; + visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit; + visit_code_item : 'c -> code_item -> unit; + visit_collection_op : 'c -> collection_op -> unit; + visit_constructor : 'c -> constructor -> unit; + visit_definition : 'c -> definition -> unit; + visit_enum_decl : 'c -> enum_decl -> unit; + visit_enum_decl_case : 'c -> enum_decl_case -> unit; + visit_exception_to : 'c -> exception_to -> unit; + visit_expression : 'c -> expression -> unit; + visit_func_typ : 'c -> func_typ -> unit; + visit_ident : 'c -> ident -> unit; + visit_law_article : 'c -> law_article -> unit; + visit_law_article_item : 'c -> law_article_item -> unit; + visit_law_heading : 'c -> law_heading -> unit; + visit_law_include : 'c -> law_include -> unit; + visit_law_structure : 'c -> law_structure -> unit; + visit_literal : 'c -> literal -> unit; + visit_literal_date : 'c -> literal_date -> unit; + visit_literal_number : 'c -> literal_number -> unit; + visit_literal_unit : 'c -> literal_unit -> unit; + visit_marked : 'a. + ('c -> 'a -> unit) -> + 'c -> 'a Utils.Pos.marked -> unit; + visit_match_case : 'c -> match_case -> unit; + visit_match_case_pattern : 'c -> + (constructor Utils.Pos.marked option * + constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> + unit; + visit_match_cases : 'c -> match_cases -> unit; + visit_meta_assertion : 'c -> meta_assertion -> unit; + visit_money_amount : 'c -> money_amount -> unit; + visit_op_kind : 'c -> op_kind -> unit; + visit_primitive_typ : 'c -> primitive_typ -> unit; + visit_program : 'c -> program -> unit; + visit_program_item : 'c -> program_item -> unit; + visit_qident : 'c -> ident Utils.Pos.marked list -> unit; + visit_rule : 'c -> rule -> unit; + visit_scope_decl : 'c -> scope_decl -> unit; + visit_scope_decl_context_data : 'c -> scope_decl_context_data -> unit; + visit_scope_decl_context_item : 'c -> scope_decl_context_item -> unit; + visit_scope_decl_context_scope : 'c -> + scope_decl_context_scope -> unit; + visit_scope_use : 'c -> scope_use -> unit; + visit_scope_use_item : 'c -> scope_use_item -> unit; + visit_source_repr : 'c -> string Utils.Pos.marked -> unit; + visit_struct_decl : 'c -> struct_decl -> unit; + visit_struct_decl_field : 'c -> struct_decl_field -> unit; + visit_typ : 'c -> typ -> unit; visit_unop : 'c -> unop -> unit; + visit_variation_typ : 'c -> variation_typ -> unit; .. > + method visit_Add : 'c -> op_kind -> unit + method visit_Aggregate : 'c -> aggregate_func -> unit + method visit_AggregateArgExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateCount : 'c -> unit + method visit_AggregateExtremum : + 'c -> bool -> primitive_typ -> expression Utils.Pos.marked -> unit + method visit_AggregateSum : 'c -> primitive_typ -> unit + method visit_And : 'c -> unit + method visit_ArrayLit : 'c -> expression Utils.Pos.marked list -> unit + method visit_Assertion : 'c -> assertion -> unit + method visit_Base : 'c -> base_typ -> unit + method visit_Binop : + 'c -> + binop Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Boolean : 'c -> unit + method visit_Builtin : 'c -> builtin_expression -> unit + method visit_Cardinal : 'c -> unit + method visit_CatalaFile : 'c -> string Utils.Pos.marked -> unit + method visit_CodeBlock : + 'c -> code_block -> string Utils.Pos.marked -> unit + method visit_Collection : 'c -> base_typ_data Utils.Pos.marked -> unit + method visit_CollectionOp : + 'c -> + collection_op Utils.Pos.marked -> + ident Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Condition : 'c -> unit + method visit_ContextData : 'c -> scope_decl_context_data -> unit + method visit_ContextScope : 'c -> scope_decl_context_scope -> unit + method visit_Data : 'c -> base_typ_data -> unit + method visit_Date : 'c -> unit + method visit_Day : 'c -> unit + method visit_Dec : 'c -> Z.t -> Z.t -> unit + method visit_Decimal : 'c -> unit + method visit_Decreasing : 'c -> unit + method visit_Definition : 'c -> definition -> unit + method visit_Div : 'c -> op_kind -> unit + method visit_Dotted : + 'c -> + expression Utils.Pos.marked -> + constructor Utils.Pos.marked option -> ident Utils.Pos.marked -> unit + method visit_Duration : 'c -> unit + method visit_EnumDecl : 'c -> enum_decl -> unit + method visit_EnumInject : + 'c -> + constructor Utils.Pos.marked option -> + constructor Utils.Pos.marked -> + expression Utils.Pos.marked option -> unit + method visit_EnumProject : + 'c -> + expression Utils.Pos.marked -> constructor Utils.Pos.marked -> unit + method visit_Eq : 'c -> unit + method visit_ExceptionToLabel : 'c -> ident Utils.Pos.marked -> unit + method visit_Exists : 'c -> unit + method visit_Filter : 'c -> unit + method visit_FixedBy : + 'c -> qident Utils.Pos.marked -> ident Utils.Pos.marked -> unit + method visit_Forall : 'c -> unit + method visit_FunCall : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Func : 'c -> func_typ -> unit + method visit_GetDay : 'c -> unit + method visit_GetMonth : 'c -> unit + method visit_GetYear : 'c -> unit + method visit_Gt : 'c -> op_kind -> unit + method visit_Gte : 'c -> op_kind -> unit + method visit_Ident : 'c -> ident -> unit + method visit_IfThenElse : + 'c -> + expression Utils.Pos.marked -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_Increasing : 'c -> unit + method visit_Int : 'c -> Z.t -> unit + method visit_IntToDec : 'c -> unit + method visit_Integer : 'c -> unit + method visit_IntermediateText : 'c -> string -> unit + method visit_KDate : 'c -> unit + method visit_KDec : 'c -> unit + method visit_KDuration : 'c -> unit + method visit_KInt : 'c -> unit + method visit_KMoney : 'c -> unit + method visit_LBool : 'c -> bool -> unit + method visit_LDate : 'c -> literal_date -> unit + method visit_LMoneyAmount : 'c -> money_amount -> unit + method visit_LNumber : + 'c -> + literal_number Utils.Pos.marked -> + literal_unit Utils.Pos.marked option -> unit + method visit_LawArticle : + 'c -> law_article -> law_article_item list -> unit + method visit_LawHeading : 'c -> law_heading -> law_structure list -> unit + method visit_LawInclude : 'c -> law_include -> unit + method visit_LawStructure : 'c -> law_structure -> unit + method visit_LawText : 'c -> string -> unit + method visit_LegislativeText : 'c -> string Utils.Pos.marked -> unit + method visit_Literal : 'c -> literal -> unit + method visit_Lt : 'c -> op_kind -> unit + method visit_Lte : 'c -> op_kind -> unit + method visit_Map : 'c -> unit + method visit_MatchWith : + 'c -> + expression Utils.Pos.marked -> match_cases Utils.Pos.marked -> unit + method visit_MemCollection : + 'c -> + expression Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_MetaAssertion : 'c -> meta_assertion -> unit + method visit_MetadataBlock : + 'c -> code_block -> string Utils.Pos.marked -> unit + method visit_Minus : 'c -> op_kind -> unit + method visit_Money : 'c -> unit + method visit_Month : 'c -> unit + method visit_Mult : 'c -> op_kind -> unit + method visit_Named : 'c -> constructor -> unit + method visit_Neq : 'c -> unit + method visit_Not : 'c -> unit + method visit_NotAnException : 'c -> unit + method visit_Or : 'c -> unit + method visit_PdfFile : + 'c -> string Utils.Pos.marked -> int option -> unit + method visit_Percent : 'c -> unit + method visit_Primitive : 'c -> primitive_typ -> unit + method visit_Rule : 'c -> rule -> unit + method visit_ScopeDecl : 'c -> scope_decl -> unit + method visit_ScopeUse : 'c -> scope_use -> unit + method visit_StructDecl : 'c -> struct_decl -> unit + method visit_StructLit : + 'c -> + constructor Utils.Pos.marked -> + (ident Utils.Pos.marked * expression Utils.Pos.marked) list -> unit + method visit_Sub : 'c -> op_kind -> unit + method visit_TestMatchCase : + 'c -> + expression Utils.Pos.marked -> + match_case_pattern Utils.Pos.marked -> unit + method visit_Text : 'c -> unit + method visit_UnlabeledException : 'c -> unit + method visit_Unop : + 'c -> unop Utils.Pos.marked -> expression Utils.Pos.marked -> unit + method visit_VariesWith : + 'c -> + qident Utils.Pos.marked -> + expression Utils.Pos.marked -> + variation_typ Utils.Pos.marked option -> unit + method visit_Year : 'c -> unit + method visit_aggregate_func : 'c -> aggregate_func -> unit + method private visit_array : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a array -> unit + method visit_assertion : 'c -> assertion -> unit + method visit_base_typ : 'c -> base_typ -> unit + method visit_base_typ_data : 'c -> base_typ_data -> unit + method visit_binop : 'c -> binop -> unit + method private visit_bool : 'env. 'env -> bool -> unit + method visit_builtin_expression : 'c -> builtin_expression -> unit + method private visit_bytes : 'env. 'env -> bytes -> unit + method private visit_char : 'env. 'env -> char -> unit + method visit_code_block : 'c -> code_item Utils.Pos.marked list -> unit + method visit_code_item : 'c -> code_item -> unit + method visit_collection_op : 'c -> collection_op -> unit + method visit_constructor : 'c -> constructor -> unit + method visit_definition : 'c -> definition -> unit + method visit_enum_decl : 'c -> enum_decl -> unit + method visit_enum_decl_case : 'c -> enum_decl_case -> unit + method visit_exception_to : 'c -> exception_to -> unit + method visit_expression : 'c -> expression -> unit + method private visit_float : 'env. 'env -> float -> unit + method visit_func_typ : 'c -> func_typ -> unit + method visit_ident : 'c -> ident -> unit + method private visit_int : 'env. 'env -> int -> unit + method private visit_int32 : 'env. 'env -> int32 -> unit + method private visit_int64 : 'env. 'env -> int64 -> unit + method visit_law_article : 'c -> law_article -> unit + method visit_law_article_item : 'c -> law_article_item -> unit + method visit_law_heading : 'c -> law_heading -> unit + method visit_law_include : 'c -> law_include -> unit + method visit_law_structure : 'c -> law_structure -> unit + method private visit_lazy_t : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a Lazy.t -> unit + method private visit_list : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a list -> unit + method visit_literal : 'c -> literal -> unit + method visit_literal_date : 'c -> literal_date -> unit + method visit_literal_number : 'c -> literal_number -> unit + method visit_literal_unit : 'c -> literal_unit -> unit + method visit_marked : + ('c -> 'a -> unit) -> 'c -> 'a Utils.Pos.marked -> unit + method visit_match_case : 'c -> match_case -> unit + method visit_match_case_pattern : + 'c -> + (constructor Utils.Pos.marked option * constructor Utils.Pos.marked) + list * ident Utils.Pos.marked option -> unit + method visit_match_cases : 'c -> match_cases -> unit + method visit_meta_assertion : 'c -> meta_assertion -> unit + method visit_money_amount : 'c -> money_amount -> unit + method private visit_nativeint : 'env. 'env -> nativeint -> unit + method visit_op_kind : 'c -> op_kind -> unit + method private visit_option : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a option -> unit + method visit_primitive_typ : 'c -> primitive_typ -> unit + method visit_program : 'c -> program -> unit + method visit_program_item : 'c -> program_item -> unit + method visit_qident : 'c -> ident Utils.Pos.marked list -> unit + method private visit_ref : + 'env 'a. ('env -> 'a -> unit) -> 'env -> 'a ref -> unit + method private visit_result : + 'env 'a 'e. + ('env -> 'a -> unit) -> + ('env -> 'e -> unit) -> 'env -> ('a, 'e) Result.result -> unit + method visit_rule : 'c -> rule -> unit + method visit_scope_decl : 'c -> scope_decl -> unit + method visit_scope_decl_context_data : + 'c -> scope_decl_context_data -> unit + method visit_scope_decl_context_item : + 'c -> scope_decl_context_item -> unit + method visit_scope_decl_context_scope : + 'c -> scope_decl_context_scope -> unit + method visit_scope_use : 'c -> scope_use -> unit + method visit_scope_use_item : 'c -> scope_use_item -> unit + method visit_source_repr : 'c -> string Utils.Pos.marked -> unit + method private visit_string : 'env. 'env -> string -> unit + method visit_struct_decl : 'c -> struct_decl -> unit + method visit_struct_decl_field : 'c -> struct_decl_field -> unit + method visit_typ : 'c -> typ -> unit + method private visit_unit : 'env. 'env -> unit -> unit + method visit_unop : 'c -> unop -> unit + method visit_variation_typ : 'c -> variation_typ -> unit + end +type source_file_or_master = + SourceFile of program_item list + | MasterFile of string Utils.Pos.marked list diff --git a/src/catala/surface/desugaring.mli b/src/catala/surface/desugaring.mli new file mode 100644 index 00000000..c71cf8a3 --- /dev/null +++ b/src/catala/surface/desugaring.mli @@ -0,0 +1,75 @@ +val translate_op_kind : Ast.op_kind -> Dcalc.Ast.op_kind +val translate_binop : Ast.binop -> Dcalc.Ast.binop +val translate_unop : Ast.unop -> Dcalc.Ast.unop +module LiftStructFieldMap : + sig + val lift_box : + 'a Bindlib.box Scopelang.Ast.StructFieldMap.t -> + 'a Scopelang.Ast.StructFieldMap.t Bindlib.box + end +module LiftEnumConstructorMap : + sig + val lift_box : + 'a Bindlib.box Scopelang.Ast.EnumConstructorMap.t -> + 'a Scopelang.Ast.EnumConstructorMap.t Bindlib.box + end +val disambiguate_constructor : + Name_resolution.context -> + (string Utils.Pos.marked option * string Utils.Pos.marked) list -> + Utils.Pos.t -> Scopelang.Ast.EnumName.t * Scopelang.Ast.EnumConstructor.t +val translate_expr : + Scopelang.Ast.ScopeName.t -> + Name_resolution.context -> + Ast.expression Utils.Pos.marked -> + Scopelang.Ast.expr Utils.Pos.marked Bindlib.box +val disambiguate_match_and_build_expression : + Scopelang.Ast.ScopeName.t -> + Name_resolution.context -> + Ast.match_cases -> + Scopelang.Ast.expr Utils.Pos.marked Bindlib.box + Scopelang.Ast.EnumConstructorMap.t * Scopelang.Ast.EnumName.t +val merge_conditions : + Scopelang.Ast.expr Utils.Pos.marked Bindlib.box option -> + Scopelang.Ast.expr Utils.Pos.marked Bindlib.box option -> + Utils.Pos.t -> Scopelang.Ast.expr Utils.Pos.marked Bindlib.box +val process_default : + Name_resolution.context -> + Scopelang.Ast.ScopeName.t -> + Desugared.Ast.ScopeDef.t Utils.Pos.marked -> + Scopelang.Ast.Var.t Utils.Pos.marked option -> + Scopelang.Ast.expr Utils.Pos.marked Bindlib.box option -> + Desugared.Ast.RuleName.t Utils.Pos.marked option -> + Ast.expression Utils.Pos.marked option -> + Ast.expression Utils.Pos.marked -> Desugared.Ast.rule +val process_def : + Scopelang.Ast.expr Utils.Pos.marked Bindlib.box option -> + Scopelang.Ast.ScopeName.t -> + Name_resolution.context -> + Desugared.Ast.program -> Ast.definition -> Desugared.Ast.program +val rule_to_def : Ast.rule -> Ast.definition +val process_rule : + Scopelang.Ast.expr Utils.Pos.marked Bindlib.box option -> + Scopelang.Ast.ScopeName.t -> + Name_resolution.context -> + Desugared.Ast.program -> Ast.rule -> Desugared.Ast.program +val process_assert : + Scopelang.Ast.expr Utils.Pos.marked Bindlib.box option -> + Scopelang.Ast.ScopeName.t -> + Name_resolution.context -> + Desugared.Ast.program -> Ast.assertion -> Desugared.Ast.program +val process_scope_use_item : + Ast.expression Utils.Pos.marked option -> + Scopelang.Ast.ScopeName.t -> + Name_resolution.context -> + Desugared.Ast.program -> + Ast.scope_use_item Utils.Pos.marked -> Desugared.Ast.program +val check_unlabeled_exception : + Scopelang.Ast.ScopeName.t -> + Name_resolution.context -> + Ast.scope_use_item Utils.Pos.marked -> unit +val process_scope_use : + Name_resolution.context -> + Desugared.Ast.program -> Ast.scope_use -> Desugared.Ast.program +val desugar_program : + Name_resolution.context -> + Ast.program -> Desugared.Ast.program diff --git a/src/catala/surface/fill_positions.mli b/src/catala/surface/fill_positions.mli new file mode 100644 index 00000000..a91e61ca --- /dev/null +++ b/src/catala/surface/fill_positions.mli @@ -0,0 +1,2 @@ +val fill_pos_with_legislative_info : + Ast.program -> Ast.program diff --git a/src/catala/surface/lexer.mli b/src/catala/surface/lexer.mli new file mode 100644 index 00000000..90e0634a --- /dev/null +++ b/src/catala/surface/lexer.mli @@ -0,0 +1,221 @@ +val __sedlex_table_92 : string +val __sedlex_table_8 : string +val __sedlex_table_16 : string +val __sedlex_table_10 : string +val __sedlex_table_13 : string +val __sedlex_table_19 : string +val __sedlex_table_22 : string +val __sedlex_table_23 : string +val __sedlex_table_24 : string +val __sedlex_table_25 : string +val __sedlex_table_26 : string +val __sedlex_table_27 : string +val __sedlex_table_33 : string +val __sedlex_table_43 : string +val __sedlex_table_62 : string +val __sedlex_table_63 : string +val __sedlex_table_64 : string +val __sedlex_table_65 : string +val __sedlex_table_87 : string +val __sedlex_table_94 : string +val __sedlex_table_1 : string +val __sedlex_table_3 : string +val __sedlex_table_4 : string +val __sedlex_table_5 : string +val __sedlex_table_6 : string +val __sedlex_table_7 : string +val __sedlex_table_11 : string +val __sedlex_table_18 : string +val __sedlex_table_21 : string +val __sedlex_table_29 : string +val __sedlex_table_30 : string +val __sedlex_table_32 : string +val __sedlex_table_34 : string +val __sedlex_table_35 : string +val __sedlex_table_36 : string +val __sedlex_table_37 : string +val __sedlex_table_40 : string +val __sedlex_table_41 : string +val __sedlex_table_44 : string +val __sedlex_table_45 : string +val __sedlex_table_47 : string +val __sedlex_table_48 : string +val __sedlex_table_49 : string +val __sedlex_table_51 : string +val __sedlex_table_56 : string +val __sedlex_table_60 : string +val __sedlex_table_67 : string +val __sedlex_table_69 : string +val __sedlex_table_70 : string +val __sedlex_table_71 : string +val __sedlex_table_72 : string +val __sedlex_table_73 : string +val __sedlex_table_74 : string +val __sedlex_table_76 : string +val __sedlex_table_79 : string +val __sedlex_table_80 : string +val __sedlex_table_81 : string +val __sedlex_table_82 : string +val __sedlex_table_84 : string +val __sedlex_table_85 : string +val __sedlex_table_86 : string +val __sedlex_table_89 : string +val __sedlex_table_90 : string +val __sedlex_table_91 : string +val __sedlex_table_93 : string +val __sedlex_table_97 : string +val __sedlex_table_14 : string +val __sedlex_table_31 : string +val __sedlex_table_46 : string +val __sedlex_table_53 : string +val __sedlex_table_98 : string +val __sedlex_table_68 : string +val __sedlex_table_96 : string +val __sedlex_table_54 : string +val __sedlex_table_9 : string +val __sedlex_table_20 : string +val __sedlex_table_52 : string +val __sedlex_table_59 : string +val __sedlex_table_39 : string +val __sedlex_table_2 : string +val __sedlex_table_12 : string +val __sedlex_table_55 : string +val __sedlex_table_88 : string +val __sedlex_table_15 : string +val __sedlex_table_95 : string +val __sedlex_table_17 : string +val __sedlex_table_77 : string +val __sedlex_table_28 : string +val __sedlex_table_42 : string +val __sedlex_table_57 : string +val __sedlex_table_58 : string +val __sedlex_table_66 : string +val __sedlex_table_75 : string +val __sedlex_table_83 : string +val __sedlex_table_38 : string +val __sedlex_table_50 : string +val __sedlex_table_78 : string +val __sedlex_table_61 : string +val __sedlex_partition_51 : Uchar.t option -> int +val __sedlex_partition_3 : Uchar.t option -> int +val __sedlex_partition_30 : Uchar.t option -> int +val __sedlex_partition_44 : Uchar.t option -> int +val __sedlex_partition_19 : Uchar.t option -> int +val __sedlex_partition_93 : Uchar.t option -> int +val __sedlex_partition_37 : Uchar.t option -> int +val __sedlex_partition_27 : Uchar.t option -> int +val __sedlex_partition_78 : Uchar.t option -> int +val __sedlex_partition_74 : Uchar.t option -> int +val __sedlex_partition_6 : Uchar.t option -> int +val __sedlex_partition_11 : Uchar.t option -> int +val __sedlex_partition_103 : Uchar.t option -> int +val __sedlex_partition_33 : Uchar.t option -> int +val __sedlex_partition_41 : Uchar.t option -> int +val __sedlex_partition_102 : Uchar.t option -> int +val __sedlex_partition_4 : Uchar.t option -> int +val __sedlex_partition_12 : Uchar.t option -> int +val __sedlex_partition_15 : Uchar.t option -> int +val __sedlex_partition_82 : Uchar.t option -> int +val __sedlex_partition_5 : Uchar.t option -> int +val __sedlex_partition_61 : Uchar.t option -> int +val __sedlex_partition_86 : Uchar.t option -> int +val __sedlex_partition_90 : Uchar.t option -> int +val __sedlex_partition_60 : Uchar.t option -> int +val __sedlex_partition_101 : Uchar.t option -> int +val __sedlex_partition_104 : Uchar.t option -> int +val __sedlex_partition_106 : Uchar.t option -> int +val __sedlex_partition_108 : Uchar.t option -> int +val __sedlex_partition_110 : Uchar.t option -> int +val __sedlex_partition_112 : Uchar.t option -> int +val __sedlex_partition_13 : Uchar.t option -> int +val __sedlex_partition_46 : Uchar.t option -> int +val __sedlex_partition_56 : Uchar.t option -> int +val __sedlex_partition_65 : Uchar.t option -> int +val __sedlex_partition_94 : Uchar.t option -> int +val __sedlex_partition_64 : Uchar.t option -> int +val __sedlex_partition_39 : Uchar.t option -> int +val __sedlex_partition_105 : Uchar.t option -> int +val __sedlex_partition_31 : Uchar.t option -> int +val __sedlex_partition_34 : Uchar.t option -> int +val __sedlex_partition_22 : Uchar.t option -> int +val __sedlex_partition_54 : Uchar.t option -> int +val __sedlex_partition_98 : Uchar.t option -> int +val __sedlex_partition_1 : Uchar.t option -> int +val __sedlex_partition_29 : Uchar.t option -> int +val __sedlex_partition_7 : Uchar.t option -> int +val __sedlex_partition_18 : Uchar.t option -> int +val __sedlex_partition_89 : Uchar.t option -> int +val __sedlex_partition_63 : Uchar.t option -> int +val __sedlex_partition_109 : Uchar.t option -> int +val __sedlex_partition_57 : Uchar.t option -> int +val __sedlex_partition_58 : Uchar.t option -> int +val __sedlex_partition_91 : Uchar.t option -> int +val __sedlex_partition_66 : Uchar.t option -> int +val __sedlex_partition_17 : Uchar.t option -> int +val __sedlex_partition_96 : Uchar.t option -> int +val __sedlex_partition_23 : Uchar.t option -> int +val __sedlex_partition_55 : Uchar.t option -> int +val __sedlex_partition_83 : Uchar.t option -> int +val __sedlex_partition_2 : Uchar.t option -> int +val __sedlex_partition_45 : Uchar.t option -> int +val __sedlex_partition_81 : Uchar.t option -> int +val __sedlex_partition_95 : Uchar.t option -> int +val __sedlex_partition_97 : Uchar.t option -> int +val __sedlex_partition_10 : Uchar.t option -> int +val __sedlex_partition_36 : Uchar.t option -> int +val __sedlex_partition_80 : Uchar.t option -> int +val __sedlex_partition_70 : Uchar.t option -> int +val __sedlex_partition_72 : Uchar.t option -> int +val __sedlex_partition_28 : Uchar.t option -> int +val __sedlex_partition_87 : Uchar.t option -> int +val __sedlex_partition_100 : Uchar.t option -> int +val __sedlex_partition_107 : Uchar.t option -> int +val __sedlex_partition_111 : Uchar.t option -> int +val __sedlex_partition_113 : Uchar.t option -> int +val __sedlex_partition_9 : Uchar.t option -> int +val __sedlex_partition_26 : Uchar.t option -> int +val __sedlex_partition_85 : Uchar.t option -> int +val __sedlex_partition_40 : Uchar.t option -> int +val __sedlex_partition_42 : Uchar.t option -> int +val __sedlex_partition_52 : Uchar.t option -> int +val __sedlex_partition_59 : Uchar.t option -> int +val __sedlex_partition_25 : Uchar.t option -> int +val __sedlex_partition_43 : Uchar.t option -> int +val __sedlex_partition_62 : Uchar.t option -> int +val __sedlex_partition_20 : Uchar.t option -> int +val __sedlex_partition_99 : Uchar.t option -> int +val __sedlex_partition_21 : Uchar.t option -> int +val __sedlex_partition_68 : Uchar.t option -> int +val __sedlex_partition_88 : Uchar.t option -> int +val __sedlex_partition_53 : Uchar.t option -> int +val __sedlex_partition_32 : Uchar.t option -> int +val __sedlex_partition_16 : Uchar.t option -> int +val __sedlex_partition_67 : Uchar.t option -> int +val __sedlex_partition_71 : Uchar.t option -> int +val __sedlex_partition_8 : Uchar.t option -> int +val __sedlex_partition_24 : Uchar.t option -> int +val __sedlex_partition_35 : Uchar.t option -> int +val __sedlex_partition_50 : Uchar.t option -> int +val __sedlex_partition_76 : Uchar.t option -> int +val __sedlex_partition_79 : Uchar.t option -> int +val __sedlex_partition_14 : Uchar.t option -> int +val __sedlex_partition_38 : Uchar.t option -> int +val __sedlex_partition_49 : Uchar.t option -> int +val __sedlex_partition_77 : Uchar.t option -> int +val __sedlex_partition_48 : Uchar.t option -> int +val __sedlex_partition_73 : Uchar.t option -> int +val __sedlex_partition_84 : Uchar.t option -> int +val __sedlex_partition_69 : Uchar.t option -> int +val __sedlex_partition_47 : Uchar.t option -> int +val __sedlex_partition_75 : Uchar.t option -> int +val __sedlex_partition_92 : Uchar.t option -> int +module R = Re.Pcre +val is_code : bool ref +val code_string_acc : string ref +val update_acc : Sedlexing.lexbuf -> unit +val raise_lexer_error : Utils.Pos.t -> string -> 'a +val token_list_language_agnostic : (string * Parser.token) list +val token_list : (string * Parser.token) list +val lex_code : Sedlexing.lexbuf -> Parser.token +val lex_law : Sedlexing.lexbuf -> Parser.token +val lexer : Sedlexing.lexbuf -> Parser.token diff --git a/src/catala/surface/lexer_en.mli b/src/catala/surface/lexer_en.mli new file mode 100644 index 00000000..b4a227e6 --- /dev/null +++ b/src/catala/surface/lexer_en.mli @@ -0,0 +1,225 @@ +val __sedlex_table_93 : string +val __sedlex_table_9 : string +val __sedlex_table_17 : string +val __sedlex_table_11 : string +val __sedlex_table_13 : string +val __sedlex_table_20 : string +val __sedlex_table_23 : string +val __sedlex_table_24 : string +val __sedlex_table_25 : string +val __sedlex_table_26 : string +val __sedlex_table_27 : string +val __sedlex_table_28 : string +val __sedlex_table_36 : string +val __sedlex_table_46 : string +val __sedlex_table_65 : string +val __sedlex_table_66 : string +val __sedlex_table_67 : string +val __sedlex_table_68 : string +val __sedlex_table_88 : string +val __sedlex_table_95 : string +val __sedlex_table_1 : string +val __sedlex_table_3 : string +val __sedlex_table_4 : string +val __sedlex_table_5 : string +val __sedlex_table_6 : string +val __sedlex_table_7 : string +val __sedlex_table_8 : string +val __sedlex_table_15 : string +val __sedlex_table_19 : string +val __sedlex_table_22 : string +val __sedlex_table_30 : string +val __sedlex_table_31 : string +val __sedlex_table_32 : string +val __sedlex_table_34 : string +val __sedlex_table_35 : string +val __sedlex_table_37 : string +val __sedlex_table_38 : string +val __sedlex_table_39 : string +val __sedlex_table_40 : string +val __sedlex_table_41 : string +val __sedlex_table_43 : string +val __sedlex_table_44 : string +val __sedlex_table_48 : string +val __sedlex_table_49 : string +val __sedlex_table_50 : string +val __sedlex_table_51 : string +val __sedlex_table_53 : string +val __sedlex_table_58 : string +val __sedlex_table_60 : string +val __sedlex_table_63 : string +val __sedlex_table_70 : string +val __sedlex_table_72 : string +val __sedlex_table_73 : string +val __sedlex_table_74 : string +val __sedlex_table_75 : string +val __sedlex_table_76 : string +val __sedlex_table_77 : string +val __sedlex_table_79 : string +val __sedlex_table_81 : string +val __sedlex_table_82 : string +val __sedlex_table_85 : string +val __sedlex_table_86 : string +val __sedlex_table_87 : string +val __sedlex_table_90 : string +val __sedlex_table_91 : string +val __sedlex_table_92 : string +val __sedlex_table_94 : string +val __sedlex_table_97 : string +val __sedlex_table_99 : string +val __sedlex_table_14 : string +val __sedlex_table_33 : string +val __sedlex_table_47 : string +val __sedlex_table_55 : string +val __sedlex_table_100 : string +val __sedlex_table_71 : string +val __sedlex_table_98 : string +val __sedlex_table_56 : string +val __sedlex_table_10 : string +val __sedlex_table_21 : string +val __sedlex_table_54 : string +val __sedlex_table_62 : string +val __sedlex_table_83 : string +val __sedlex_table_2 : string +val __sedlex_table_12 : string +val __sedlex_table_57 : string +val __sedlex_table_89 : string +val __sedlex_table_16 : string +val __sedlex_table_96 : string +val __sedlex_table_18 : string +val __sedlex_table_29 : string +val __sedlex_table_45 : string +val __sedlex_table_59 : string +val __sedlex_table_61 : string +val __sedlex_table_69 : string +val __sedlex_table_78 : string +val __sedlex_table_84 : string +val __sedlex_table_42 : string +val __sedlex_table_52 : string +val __sedlex_table_80 : string +val __sedlex_table_64 : string +val __sedlex_partition_54 : Uchar.t option -> int +val __sedlex_partition_3 : Uchar.t option -> int +val __sedlex_partition_48 : Uchar.t option -> int +val __sedlex_partition_18 : Uchar.t option -> int +val __sedlex_partition_99 : Uchar.t option -> int +val __sedlex_partition_44 : Uchar.t option -> int +val __sedlex_partition_59 : Uchar.t option -> int +val __sedlex_partition_28 : Uchar.t option -> int +val __sedlex_partition_32 : Uchar.t option -> int +val __sedlex_partition_84 : Uchar.t option -> int +val __sedlex_partition_66 : Uchar.t option -> int +val __sedlex_partition_80 : Uchar.t option -> int +val __sedlex_partition_6 : Uchar.t option -> int +val __sedlex_partition_10 : Uchar.t option -> int +val __sedlex_partition_65 : Uchar.t option -> int +val __sedlex_partition_109 : Uchar.t option -> int +val __sedlex_partition_39 : Uchar.t option -> int +val __sedlex_partition_108 : Uchar.t option -> int +val __sedlex_partition_4 : Uchar.t option -> int +val __sedlex_partition_60 : Uchar.t option -> int +val __sedlex_partition_74 : Uchar.t option -> int +val __sedlex_partition_11 : Uchar.t option -> int +val __sedlex_partition_88 : Uchar.t option -> int +val __sedlex_partition_5 : Uchar.t option -> int +val __sedlex_partition_63 : Uchar.t option -> int +val __sedlex_partition_92 : Uchar.t option -> int +val __sedlex_partition_96 : Uchar.t option -> int +val __sedlex_partition_62 : Uchar.t option -> int +val __sedlex_partition_107 : Uchar.t option -> int +val __sedlex_partition_110 : Uchar.t option -> int +val __sedlex_partition_112 : Uchar.t option -> int +val __sedlex_partition_114 : Uchar.t option -> int +val __sedlex_partition_116 : Uchar.t option -> int +val __sedlex_partition_118 : Uchar.t option -> int +val __sedlex_partition_12 : Uchar.t option -> int +val __sedlex_partition_50 : Uchar.t option -> int +val __sedlex_partition_71 : Uchar.t option -> int +val __sedlex_partition_29 : Uchar.t option -> int +val __sedlex_partition_58 : Uchar.t option -> int +val __sedlex_partition_100 : Uchar.t option -> int +val __sedlex_partition_35 : Uchar.t option -> int +val __sedlex_partition_70 : Uchar.t option -> int +val __sedlex_partition_46 : Uchar.t option -> int +val __sedlex_partition_111 : Uchar.t option -> int +val __sedlex_partition_25 : Uchar.t option -> int +val __sedlex_partition_30 : Uchar.t option -> int +val __sedlex_partition_26 : Uchar.t option -> int +val __sedlex_partition_24 : Uchar.t option -> int +val __sedlex_partition_57 : Uchar.t option -> int +val __sedlex_partition_104 : Uchar.t option -> int +val __sedlex_partition_34 : Uchar.t option -> int +val __sedlex_partition_17 : Uchar.t option -> int +val __sedlex_partition_95 : Uchar.t option -> int +val __sedlex_partition_69 : Uchar.t option -> int +val __sedlex_partition_115 : Uchar.t option -> int +val __sedlex_partition_97 : Uchar.t option -> int +val __sedlex_partition_72 : Uchar.t option -> int +val __sedlex_partition_15 : Uchar.t option -> int +val __sedlex_partition_102 : Uchar.t option -> int +val __sedlex_partition_22 : Uchar.t option -> int +val __sedlex_partition_31 : Uchar.t option -> int +val __sedlex_partition_47 : Uchar.t option -> int +val __sedlex_partition_89 : Uchar.t option -> int +val __sedlex_partition_2 : Uchar.t option -> int +val __sedlex_partition_49 : Uchar.t option -> int +val __sedlex_partition_87 : Uchar.t option -> int +val __sedlex_partition_101 : Uchar.t option -> int +val __sedlex_partition_103 : Uchar.t option -> int +val __sedlex_partition_9 : Uchar.t option -> int +val __sedlex_partition_43 : Uchar.t option -> int +val __sedlex_partition_86 : Uchar.t option -> int +val __sedlex_partition_14 : Uchar.t option -> int +val __sedlex_partition_76 : Uchar.t option -> int +val __sedlex_partition_78 : Uchar.t option -> int +val __sedlex_partition_33 : Uchar.t option -> int +val __sedlex_partition_93 : Uchar.t option -> int +val __sedlex_partition_106 : Uchar.t option -> int +val __sedlex_partition_113 : Uchar.t option -> int +val __sedlex_partition_117 : Uchar.t option -> int +val __sedlex_partition_119 : Uchar.t option -> int +val __sedlex_partition_8 : Uchar.t option -> int +val __sedlex_partition_21 : Uchar.t option -> int +val __sedlex_partition_91 : Uchar.t option -> int +val __sedlex_partition_67 : Uchar.t option -> int +val __sedlex_partition_73 : Uchar.t option -> int +val __sedlex_partition_41 : Uchar.t option -> int +val __sedlex_partition_16 : Uchar.t option -> int +val __sedlex_partition_36 : Uchar.t option -> int +val __sedlex_partition_40 : Uchar.t option -> int +val __sedlex_partition_64 : Uchar.t option -> int +val __sedlex_partition_55 : Uchar.t option -> int +val __sedlex_partition_61 : Uchar.t option -> int +val __sedlex_partition_68 : Uchar.t option -> int +val __sedlex_partition_19 : Uchar.t option -> int +val __sedlex_partition_105 : Uchar.t option -> int +val __sedlex_partition_20 : Uchar.t option -> int +val __sedlex_partition_94 : Uchar.t option -> int +val __sedlex_partition_56 : Uchar.t option -> int +val __sedlex_partition_38 : Uchar.t option -> int +val __sedlex_partition_77 : Uchar.t option -> int +val __sedlex_partition_1 : Uchar.t option -> int +val __sedlex_partition_7 : Uchar.t option -> int +val __sedlex_partition_23 : Uchar.t option -> int +val __sedlex_partition_27 : Uchar.t option -> int +val __sedlex_partition_37 : Uchar.t option -> int +val __sedlex_partition_82 : Uchar.t option -> int +val __sedlex_partition_85 : Uchar.t option -> int +val __sedlex_partition_13 : Uchar.t option -> int +val __sedlex_partition_45 : Uchar.t option -> int +val __sedlex_partition_53 : Uchar.t option -> int +val __sedlex_partition_83 : Uchar.t option -> int +val __sedlex_partition_52 : Uchar.t option -> int +val __sedlex_partition_79 : Uchar.t option -> int +val __sedlex_partition_90 : Uchar.t option -> int +val __sedlex_partition_42 : Uchar.t option -> int +val __sedlex_partition_75 : Uchar.t option -> int +val __sedlex_partition_51 : Uchar.t option -> int +val __sedlex_partition_81 : Uchar.t option -> int +val __sedlex_partition_98 : Uchar.t option -> int +module L = Lexer +module R = Re.Pcre +val token_list_en : (string * Parser.token) list +val lex_code_en : Sedlexing.lexbuf -> Parser.token +val lex_law_en : Sedlexing.lexbuf -> Parser.token +val lexer_en : Sedlexing.lexbuf -> Parser.token diff --git a/src/catala/surface/lexer_fr.mli b/src/catala/surface/lexer_fr.mli new file mode 100644 index 00000000..8ffd9a75 --- /dev/null +++ b/src/catala/surface/lexer_fr.mli @@ -0,0 +1,224 @@ +val __sedlex_table_89 : string +val __sedlex_table_25 : string +val __sedlex_table_43 : string +val __sedlex_table_18 : string +val __sedlex_table_52 : string +val __sedlex_table_16 : string +val __sedlex_table_37 : string +val __sedlex_table_8 : string +val __sedlex_table_12 : string +val __sedlex_table_20 : string +val __sedlex_table_22 : string +val __sedlex_table_23 : string +val __sedlex_table_24 : string +val __sedlex_table_63 : string +val __sedlex_table_65 : string +val __sedlex_table_85 : string +val __sedlex_table_1 : string +val __sedlex_table_3 : string +val __sedlex_table_4 : string +val __sedlex_table_5 : string +val __sedlex_table_6 : string +val __sedlex_table_7 : string +val __sedlex_table_9 : string +val __sedlex_table_10 : string +val __sedlex_table_13 : string +val __sedlex_table_15 : string +val __sedlex_table_19 : string +val __sedlex_table_26 : string +val __sedlex_table_29 : string +val __sedlex_table_30 : string +val __sedlex_table_31 : string +val __sedlex_table_33 : string +val __sedlex_table_34 : string +val __sedlex_table_35 : string +val __sedlex_table_36 : string +val __sedlex_table_39 : string +val __sedlex_table_41 : string +val __sedlex_table_44 : string +val __sedlex_table_46 : string +val __sedlex_table_47 : string +val __sedlex_table_49 : string +val __sedlex_table_51 : string +val __sedlex_table_53 : string +val __sedlex_table_58 : string +val __sedlex_table_66 : string +val __sedlex_table_67 : string +val __sedlex_table_68 : string +val __sedlex_table_70 : string +val __sedlex_table_72 : string +val __sedlex_table_73 : string +val __sedlex_table_74 : string +val __sedlex_table_75 : string +val __sedlex_table_76 : string +val __sedlex_table_77 : string +val __sedlex_table_79 : string +val __sedlex_table_80 : string +val __sedlex_table_81 : string +val __sedlex_table_82 : string +val __sedlex_table_83 : string +val __sedlex_table_86 : string +val __sedlex_table_87 : string +val __sedlex_table_88 : string +val __sedlex_table_93 : string +val __sedlex_table_94 : string +val __sedlex_table_17 : string +val __sedlex_table_27 : string +val __sedlex_table_28 : string +val __sedlex_table_32 : string +val __sedlex_table_42 : string +val __sedlex_table_56 : string +val __sedlex_table_57 : string +val __sedlex_table_95 : string +val __sedlex_table_69 : string +val __sedlex_table_45 : string +val __sedlex_table_48 : string +val __sedlex_table_92 : string +val __sedlex_table_55 : string +val __sedlex_table_91 : string +val __sedlex_table_21 : string +val __sedlex_table_54 : string +val __sedlex_table_62 : string +val __sedlex_table_11 : string +val __sedlex_table_2 : string +val __sedlex_table_60 : string +val __sedlex_table_14 : string +val __sedlex_table_84 : string +val __sedlex_table_90 : string +val __sedlex_table_40 : string +val __sedlex_table_59 : string +val __sedlex_table_61 : string +val __sedlex_table_71 : string +val __sedlex_table_38 : string +val __sedlex_table_50 : string +val __sedlex_table_78 : string +val __sedlex_table_64 : string +val __sedlex_partition_65 : Uchar.t option -> int +val __sedlex_partition_3 : Uchar.t option -> int +val __sedlex_partition_20 : Uchar.t option -> int +val __sedlex_partition_74 : Uchar.t option -> int +val __sedlex_partition_24 : Uchar.t option -> int +val __sedlex_partition_109 : Uchar.t option -> int +val __sedlex_partition_29 : Uchar.t option -> int +val __sedlex_partition_101 : Uchar.t option -> int +val __sedlex_partition_116 : Uchar.t option -> int +val __sedlex_partition_48 : Uchar.t option -> int +val __sedlex_partition_16 : Uchar.t option -> int +val __sedlex_partition_42 : Uchar.t option -> int +val __sedlex_partition_83 : Uchar.t option -> int +val __sedlex_partition_1 : Uchar.t option -> int +val __sedlex_partition_13 : Uchar.t option -> int +val __sedlex_partition_37 : Uchar.t option -> int +val __sedlex_partition_41 : Uchar.t option -> int +val __sedlex_partition_117 : Uchar.t option -> int +val __sedlex_partition_23 : Uchar.t option -> int +val __sedlex_partition_36 : Uchar.t option -> int +val __sedlex_partition_51 : Uchar.t option -> int +val __sedlex_partition_86 : Uchar.t option -> int +val __sedlex_partition_72 : Uchar.t option -> int +val __sedlex_partition_110 : Uchar.t option -> int +val __sedlex_partition_91 : Uchar.t option -> int +val __sedlex_partition_61 : Uchar.t option -> int +val __sedlex_partition_98 : Uchar.t option -> int +val __sedlex_partition_106 : Uchar.t option -> int +val __sedlex_partition_115 : Uchar.t option -> int +val __sedlex_partition_120 : Uchar.t option -> int +val __sedlex_partition_123 : Uchar.t option -> int +val __sedlex_partition_5 : Uchar.t option -> int +val __sedlex_partition_49 : Uchar.t option -> int +val __sedlex_partition_111 : Uchar.t option -> int +val __sedlex_partition_12 : Uchar.t option -> int +val __sedlex_partition_39 : Uchar.t option -> int +val __sedlex_partition_53 : Uchar.t option -> int +val __sedlex_partition_67 : Uchar.t option -> int +val __sedlex_partition_62 : Uchar.t option -> int +val __sedlex_partition_11 : Uchar.t option -> int +val __sedlex_partition_26 : Uchar.t option -> int +val __sedlex_partition_31 : Uchar.t option -> int +val __sedlex_partition_34 : Uchar.t option -> int +val __sedlex_partition_47 : Uchar.t option -> int +val __sedlex_partition_87 : Uchar.t option -> int +val __sedlex_partition_102 : Uchar.t option -> int +val __sedlex_partition_19 : Uchar.t option -> int +val __sedlex_partition_88 : Uchar.t option -> int +val __sedlex_partition_18 : Uchar.t option -> int +val __sedlex_partition_107 : Uchar.t option -> int +val __sedlex_partition_56 : Uchar.t option -> int +val __sedlex_partition_14 : Uchar.t option -> int +val __sedlex_partition_30 : Uchar.t option -> int +val __sedlex_partition_94 : Uchar.t option -> int +val __sedlex_partition_113 : Uchar.t option -> int +val __sedlex_partition_7 : Uchar.t option -> int +val __sedlex_partition_25 : Uchar.t option -> int +val __sedlex_partition_50 : Uchar.t option -> int +val __sedlex_partition_103 : Uchar.t option -> int +val __sedlex_partition_10 : Uchar.t option -> int +val __sedlex_partition_68 : Uchar.t option -> int +val __sedlex_partition_89 : Uchar.t option -> int +val __sedlex_partition_57 : Uchar.t option -> int +val __sedlex_partition_2 : Uchar.t option -> int +val __sedlex_partition_4 : Uchar.t option -> int +val __sedlex_partition_66 : Uchar.t option -> int +val __sedlex_partition_90 : Uchar.t option -> int +val __sedlex_partition_97 : Uchar.t option -> int +val __sedlex_partition_112 : Uchar.t option -> int +val __sedlex_partition_8 : Uchar.t option -> int +val __sedlex_partition_59 : Uchar.t option -> int +val __sedlex_partition_95 : Uchar.t option -> int +val __sedlex_partition_6 : Uchar.t option -> int +val __sedlex_partition_79 : Uchar.t option -> int +val __sedlex_partition_81 : Uchar.t option -> int +val __sedlex_partition_73 : Uchar.t option -> int +val __sedlex_partition_82 : Uchar.t option -> int +val __sedlex_partition_104 : Uchar.t option -> int +val __sedlex_partition_122 : Uchar.t option -> int +val __sedlex_partition_21 : Uchar.t option -> int +val __sedlex_partition_28 : Uchar.t option -> int +val __sedlex_partition_38 : Uchar.t option -> int +val __sedlex_partition_64 : Uchar.t option -> int +val __sedlex_partition_93 : Uchar.t option -> int +val __sedlex_partition_75 : Uchar.t option -> int +val __sedlex_partition_40 : Uchar.t option -> int +val __sedlex_partition_44 : Uchar.t option -> int +val __sedlex_partition_100 : Uchar.t option -> int +val __sedlex_partition_46 : Uchar.t option -> int +val __sedlex_partition_52 : Uchar.t option -> int +val __sedlex_partition_114 : Uchar.t option -> int +val __sedlex_partition_119 : Uchar.t option -> int +val __sedlex_partition_45 : Uchar.t option -> int +val __sedlex_partition_54 : Uchar.t option -> int +val __sedlex_partition_55 : Uchar.t option -> int +val __sedlex_partition_43 : Uchar.t option -> int +val __sedlex_partition_63 : Uchar.t option -> int +val __sedlex_partition_27 : Uchar.t option -> int +val __sedlex_partition_32 : Uchar.t option -> int +val __sedlex_partition_105 : Uchar.t option -> int +val __sedlex_partition_118 : Uchar.t option -> int +val __sedlex_partition_33 : Uchar.t option -> int +val __sedlex_partition_58 : Uchar.t option -> int +val __sedlex_partition_80 : Uchar.t option -> int +val __sedlex_partition_17 : Uchar.t option -> int +val __sedlex_partition_22 : Uchar.t option -> int +val __sedlex_partition_35 : Uchar.t option -> int +val __sedlex_partition_99 : Uchar.t option -> int +val __sedlex_partition_121 : Uchar.t option -> int +val __sedlex_partition_15 : Uchar.t option -> int +val __sedlex_partition_60 : Uchar.t option -> int +val __sedlex_partition_69 : Uchar.t option -> int +val __sedlex_partition_77 : Uchar.t option -> int +val __sedlex_partition_96 : Uchar.t option -> int +val __sedlex_partition_85 : Uchar.t option -> int +val __sedlex_partition_92 : Uchar.t option -> int +val __sedlex_partition_9 : Uchar.t option -> int +val __sedlex_partition_71 : Uchar.t option -> int +val __sedlex_partition_78 : Uchar.t option -> int +val __sedlex_partition_70 : Uchar.t option -> int +val __sedlex_partition_76 : Uchar.t option -> int +val __sedlex_partition_84 : Uchar.t option -> int +val __sedlex_partition_108 : Uchar.t option -> int +module L = Lexer +module R = Re.Pcre +val token_list_fr : (string * Parser.token) list +val lex_code_fr : Sedlexing.lexbuf -> Parser.token +val lex_law_fr : Sedlexing.lexbuf -> Parser.token +val lexer_fr : Sedlexing.lexbuf -> Parser.token diff --git a/src/catala/surface/name_resolution.mli b/src/catala/surface/name_resolution.mli new file mode 100644 index 00000000..ec4aa3f1 --- /dev/null +++ b/src/catala/surface/name_resolution.mli @@ -0,0 +1,97 @@ +type ident = string +type typ = Scopelang.Ast.typ +type unique_rulename = Ambiguous | Unique of Desugared.Ast.RuleName.t +type scope_context = { + var_idmap : Scopelang.Ast.ScopeVar.t Desugared.Ast.IdentMap.t; + label_idmap : Desugared.Ast.RuleName.t Desugared.Ast.IdentMap.t; + default_rulemap : unique_rulename Desugared.Ast.ScopeDefMap.t; + sub_scopes_idmap : Scopelang.Ast.SubScopeName.t Desugared.Ast.IdentMap.t; + sub_scopes : Scopelang.Ast.ScopeName.t Scopelang.Ast.SubScopeMap.t; +} +type struct_context = typ Utils.Pos.marked Scopelang.Ast.StructFieldMap.t +type enum_context = typ Utils.Pos.marked Scopelang.Ast.EnumConstructorMap.t +type context = { + local_var_idmap : Scopelang.Ast.Var.t Desugared.Ast.IdentMap.t; + scope_idmap : Scopelang.Ast.ScopeName.t Desugared.Ast.IdentMap.t; + struct_idmap : Scopelang.Ast.StructName.t Desugared.Ast.IdentMap.t; + field_idmap : + Scopelang.Ast.StructFieldName.t Scopelang.Ast.StructMap.t + Desugared.Ast.IdentMap.t; + enum_idmap : Scopelang.Ast.EnumName.t Desugared.Ast.IdentMap.t; + constructor_idmap : + Scopelang.Ast.EnumConstructor.t Scopelang.Ast.EnumMap.t + Desugared.Ast.IdentMap.t; + scopes : scope_context Scopelang.Ast.ScopeMap.t; + structs : struct_context Scopelang.Ast.StructMap.t; + enums : enum_context Scopelang.Ast.EnumMap.t; + var_typs : (typ Utils.Pos.marked * bool) Scopelang.Ast.ScopeVarMap.t; +} +val raise_unsupported_feature : string -> Utils.Pos.t -> 'a +val raise_unknown_identifier : string -> ident Utils.Pos.marked -> 'a +val get_var_typ : context -> Scopelang.Ast.ScopeVar.t -> typ Utils.Pos.marked +val is_var_cond : context -> Scopelang.Ast.ScopeVar.t -> bool +val get_var_uid : + Scopelang.Ast.ScopeName.t -> + context -> ident Utils.Pos.marked -> Scopelang.Ast.ScopeVar.t +val get_subscope_uid : + Scopelang.Ast.ScopeName.t -> + context -> ident Utils.Pos.marked -> Scopelang.Ast.SubScopeName.t +val is_subscope_uid : Scopelang.Ast.ScopeName.t -> context -> ident -> bool +val belongs_to : + context -> Scopelang.Ast.ScopeVar.t -> Scopelang.Ast.ScopeName.t -> bool +val get_def_typ : context -> Desugared.Ast.ScopeDef.t -> typ Utils.Pos.marked +val is_def_cond : context -> Desugared.Ast.ScopeDef.t -> bool +val process_subscope_decl : + Scopelang.Ast.ScopeName.t -> + context -> Ast.scope_decl_context_scope -> context +val is_type_cond : Ast.typ Utils.Pos.marked -> bool +val process_base_typ : + context -> + Ast.base_typ Utils.Pos.marked -> Scopelang.Ast.typ Utils.Pos.marked +val process_type : + context -> + Ast.typ Utils.Pos.marked -> Scopelang.Ast.typ Utils.Pos.marked +val process_data_decl : + Scopelang.Ast.ScopeName.t -> + context -> Ast.scope_decl_context_data -> context +val process_item_decl : + Scopelang.Ast.ScopeName.t -> + context -> Ast.scope_decl_context_item -> context +val add_def_local_var : + context -> ident Utils.Pos.marked -> context * Scopelang.Ast.Var.t +val process_scope_decl : context -> Ast.scope_decl -> context +val process_struct_decl : context -> Ast.struct_decl -> context +val process_enum_decl : context -> Ast.enum_decl -> context +val process_decl_item : + context -> Ast.code_item Utils.Pos.marked -> context +val process_code_block : + context -> + Ast.code_block -> + (context -> Ast.code_item Utils.Pos.marked -> context) -> context +val process_law_article_item : + context -> + Ast.law_article_item -> + (context -> Ast.code_item Utils.Pos.marked -> context) -> context +val process_law_structure : + context -> + Ast.law_structure -> + (context -> Ast.code_item Utils.Pos.marked -> context) -> context +val process_program_item : + context -> + Ast.program_item -> + (context -> Ast.code_item Utils.Pos.marked -> context) -> context +val get_def_key : + Ast.qident -> + Scopelang.Ast.ScopeName.t -> + context -> Utils.Pos.t -> Desugared.Ast.ScopeDef.t +val process_rule : + context -> Scopelang.Ast.ScopeName.t -> Ast.rule -> context +val process_definition : + context -> Scopelang.Ast.ScopeName.t -> Ast.definition -> context +val process_scope_use_item : + Scopelang.Ast.ScopeName.t -> + context -> Ast.scope_use_item Utils.Pos.marked -> context +val process_scope_use : context -> Ast.scope_use -> context +val process_use_item : + context -> Ast.code_item Utils.Pos.marked -> context +val form_context : Ast.program -> context diff --git a/src/catala/surface/parse_utils.mli b/src/catala/surface/parse_utils.mli new file mode 100644 index 00000000..0113d4c9 --- /dev/null +++ b/src/catala/surface/parse_utils.mli @@ -0,0 +1 @@ +val current_file : string ref diff --git a/src/catala/surface/parser_driver.mli b/src/catala/surface/parser_driver.mli new file mode 100644 index 00000000..b95e6a48 --- /dev/null +++ b/src/catala/surface/parser_driver.mli @@ -0,0 +1,33 @@ +module I = Parser.MenhirInterpreter +val state : 'semantic_value I.env -> int +val minimum : 'a -> 'a -> 'a -> 'a +val levenshtein_distance : string -> string -> int +val law_struct_list_to_tree : + Ast.program_item list -> Ast.program_item list +val syntax_hints_style : ANSITerminal.style list +val raise_parser_error : + Utils.Pos.t -> Utils.Pos.t option -> string -> string -> 'a +val fail : + Sedlexing.lexbuf -> + 'semantic_value I.env -> + (string * Parser.token) list -> 'semantic_value I.env option -> 'a +val loop : + (unit -> Parser.token * Lexing.position * Lexing.position) -> + (string * Parser.token) list -> + Sedlexing.lexbuf -> + Ast.source_file_or_master I.env option -> + Ast.source_file_or_master I.checkpoint -> + Ast.source_file_or_master +val sedlex_with_menhir : + (Sedlexing.lexbuf -> Parser.token) -> + (string * Parser.token) list -> + (Lexing.position -> Ast.source_file_or_master I.checkpoint) -> + Sedlexing.lexbuf -> Ast.source_file_or_master +val parse_source_file : + Utils.Pos.input_file -> Utils.Cli.frontend_lang -> Ast.program +val expand_includes : + string -> + Ast.program_item list -> + Utils.Cli.frontend_lang -> Ast.program +val parse_top_level_file : + Utils.Pos.input_file -> Utils.Cli.frontend_lang -> Ast.program diff --git a/src/catala/surface/parser_errors.mli b/src/catala/surface/parser_errors.mli new file mode 100644 index 00000000..dfba44af --- /dev/null +++ b/src/catala/surface/parser_errors.mli @@ -0,0 +1 @@ +val message : int -> string diff --git a/src/catala/surface/print.mli b/src/catala/surface/print.mli new file mode 100644 index 00000000..d347f7ca --- /dev/null +++ b/src/catala/surface/print.mli @@ -0,0 +1,2 @@ +val format_primitive_typ : + Format.formatter -> Ast.primitive_typ -> unit diff --git a/src/catala/utils/cli.mli b/src/catala/utils/cli.mli new file mode 100644 index 00000000..24693344 --- /dev/null +++ b/src/catala/utils/cli.mli @@ -0,0 +1,49 @@ +type frontend_lang = [ `En | `Fr | `NonVerbose ] +type backend_lang = [ `En | `Fr ] +val to_backend_lang : frontend_lang -> backend_lang +val source_files : string list ref +val locale_lang : backend_lang ref +val contents : string ref +val debug_flag : bool ref +val style_flag : bool ref +val max_prec_digits : int ref +val trace_flag : bool ref +val file : string Cmdliner.Term.t +val debug : bool Cmdliner.Term.t +val unstyled : bool Cmdliner.Term.t +val trace_opt : bool Cmdliner.Term.t +val wrap_weaved_output : bool Cmdliner.Term.t +val backend : string Cmdliner.Term.t +type backend_option = Latex | Makefile | Html | Run | OCaml +val language : string option Cmdliner.Term.t +val max_prec_digits_opt : int option Cmdliner.Term.t +val ex_scope : string option Cmdliner.Term.t +val output : string option Cmdliner.Term.t +val pygmentize_loc : string option Cmdliner.Term.t +val catala_t : + (string -> + bool -> + bool -> + bool -> + string option -> + string -> + string option -> + int option -> bool -> string option -> string option -> 'a) -> + 'a Cmdliner.Term.t +val version : string +val info : Cmdliner.Term.info +val print_with_style : + ANSITerminal.style list -> ('a, unit, string) format -> 'a +val debug_marker : unit -> string +val error_marker : unit -> string +val warning_marker : unit -> string +val result_marker : unit -> string +val log_marker : unit -> string +val concat_with_line_depending_prefix_and_suffix : + (int -> string) -> (int -> string) -> string list -> string +val add_prefix_to_each_line : string -> (int -> string) -> string +val debug_print : string -> unit +val error_print : string -> unit +val warning_print : string -> unit +val result_print : string -> unit +val log_print : string -> unit diff --git a/src/catala/utils/errors.mli b/src/catala/utils/errors.mli new file mode 100644 index 00000000..eb2bc030 --- /dev/null +++ b/src/catala/utils/errors.mli @@ -0,0 +1,11 @@ +exception StructuredError of (string * (string option * Pos.t) list) +val print_structured_error : + string -> (string option * Pos.t) list -> string +val raise_spanned_error : string -> ?span_msg:string -> Pos.t -> 'a +val raise_multispanned_error : + string -> (string option * Pos.t) list -> 'a +val raise_error : string -> 'a +val print_multispanned_warning : + string -> (string option * Pos.t) list -> unit +val print_spanned_warning : string -> ?span_msg:string -> Pos.t -> unit +val print_warning : string -> unit