module Genr_base:sig..end
type generated_function =
| |
Construction of |
| |
Comparison of |
| |
Construction_helper of |
| |
Construction_record of |
typegenerated_functions =generated_function list
val is_construction_function : generated_function -> booltypebinary_fun_exp =Code.exp -> Code.exp -> Code.exp
typecomparisons =binary_fun_exp * binary_fun_exp *
binary_fun_exp
val comparison_function : Longident.t option -> Code.expval genr_comparisons : Code.lident option -> comparisonsval pervasives_comparisons : comparisonsval eq_function : binary_fun_exp -> Code.exp -> Code.exp -> Code.expbinary_fun_exp argument,
according to whether we have or have not to generate maximally shared
terms for the relational type at hand.val get_user_rel_order : unit -> boolval set_user_rel_order : unit -> unitval order_rels : (Parsetree.relation -> int) ->
Parsetree.relation list -> Parsetree.relation listval order_relations : (Parsetree.relation -> int) -> Parsetree.relations -> Parsetree.relationsval set_sharable_target : unit -> unitval get_sharable_target : unit -> boolval compare_function : Parsetree.generator -> Code.lidentval construction_function_name : string -> stringval construction_function_ident : Code.uident -> Code.lidentval construction_function : Parsetree.generator -> Code.lidentval construction_function_memo_table_ident : Parsetree.generator -> Code.lidentval prefix_ident : string -> Code.lident -> Code.lidentprefix_ident p id is the identifier p_id is id is not qualified,
Mod.p_id if id is qualified by module Mod.val prefix_construction_function : string -> Parsetree.generator -> Code.lidentprefix_generator_function p g is the ident "prefix_name",
where "prefix" is the contents of p,
and "name" is the uncapitalized version of g.val prefix_construction_function2 : string -> Parsetree.generator -> Parsetree.generator -> Code.lidentprefix_generator_function2 p g1 g2 is the ident "prefix_name1_name2",
where "prefix" is the contents of p,
and "name1", "name2" are the uncapitalized versions of g1, g2.val mk_sharing_function_ident : Parsetree.generator -> Code.lidentval construction : Parsetree.generator -> Code.exp list -> Code.expconstruction properly takes care of the generator arity, whatever
this arity could be.
The following specialized versions are just particular case of the generic
construction function.
val construction0 : Parsetree.generator -> Code.expval construction1 : Parsetree.generator -> Code.exp -> Code.expval construction2 : Parsetree.generator -> Code.exp -> Code.exp -> Code.exp
Presumably, the following functions are only used once to define the
construction function of a generator: we need it to build the (last)
default clause of the construction function (unless we have a proof that a
direct call to the generator is safe, because we know that the resulting
term will be in normal form).
val generator : Parsetree.generator -> Code.exp list -> Code.expval generator0 : Parsetree.generator -> Code.expval generator1 : Parsetree.generator -> Code.exp -> Code.expval generator2 : Parsetree.generator -> Code.exp -> Code.exp -> Code.expval nil : Code.expval singleton : Code.exp -> Code.expval cons : Code.exp -> Code.exp -> Code.expval append : Code.exp -> Code.exp -> Code.expval genr_rule_pattern : Parsetree.pattern -> Parsetree.pattern
Generation of the LHS of a pattern matching clause for a user's defined
rule.
val pattern_info : Parsetree.generator -> Code.pattern -> Code.pattern list -> Code.patternval pattern : Parsetree.generator -> Code.pattern list -> Code.patternval pattern0 : Parsetree.generator -> Code.patternval pattern1 : Parsetree.generator -> Code.pattern -> Code.patternval pattern2 : Parsetree.generator -> Code.pattern -> Code.pattern -> Code.patternval genr_eq : string * Parsetree.type_declaration -> Code.structure_itemt, we generate the primitive eq_t, bound to "%equal" if the
values of the type are not maximally shared, or bound to "%eq"
otherwise.val genr_projection : string * Parsetree.type_declaration ->
Parsetree.core_type -> Code.structure_itemval clauses_of_side : Parsetree.relation_side ->
Code.clause -> Code.clause -> Code.clauses -> Code.clausesval clauses_left_or_right : Parsetree.relation_side ->
Code.clause -> Code.clause -> Code.clauses -> Code.clausesval clauses_both_as_left : Parsetree.relation_side ->
Code.clause -> Code.clause -> Code.clauses -> Code.clausesval opt : bool -> Code.clause -> Code.clauses -> Code.clausesval lazy_opt : bool -> (unit -> Code.clause) -> Code.clauses -> Code.clausesval opts : bool -> Code.clauses -> Code.clauses -> Code.clausesval map_of_direction : Parsetree.distributivity_direction -> ('a -> 'b) -> 'a list -> 'b listmap like function from the predefined List module that is
suitable for the distributivity_direction argument.
This function is used to generate the code.val imap_of_direction : Parsetree.distributivity_direction -> Longident.tList module that is suitable for the
distributivity_direction argument.
This identifier will be used in the generated code.val diese_line : Location.t -> int * stringval set_dline_trace : unit -> unitval get_dline_trace : unit -> bool.ml files ?val set_comments : unit -> unitval get_comments : unit -> boolval trace_clause : int -> string -> Code.clause -> Code.clauseint string