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 -> bool
typebinary_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.exp
val genr_comparisons : Code.lident option -> comparisons
val pervasives_comparisons : comparisons
val eq_function : binary_fun_exp -> Code.exp -> Code.exp -> Code.exp
binary_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 -> bool
val set_user_rel_order : unit -> unit
val order_rels : (Parsetree.relation -> int) ->
Parsetree.relation list -> Parsetree.relation list
val order_relations : (Parsetree.relation -> int) -> Parsetree.relations -> Parsetree.relations
val set_sharable_target : unit -> unit
val get_sharable_target : unit -> bool
val compare_function : Parsetree.generator -> Code.lident
val construction_function_name : string -> string
val construction_function_ident : Code.uident -> Code.lident
val construction_function : Parsetree.generator -> Code.lident
val construction_function_memo_table_ident : Parsetree.generator -> Code.lident
val prefix_ident : string -> Code.lident -> Code.lident
prefix_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.lident
prefix_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.lident
prefix_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.lident
val construction : Parsetree.generator -> Code.exp list -> Code.exp
construction
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.exp
val construction1 : Parsetree.generator -> Code.exp -> Code.exp
val 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.exp
val generator0 : Parsetree.generator -> Code.exp
val generator1 : Parsetree.generator -> Code.exp -> Code.exp
val generator2 : Parsetree.generator -> Code.exp -> Code.exp -> Code.exp
val nil : Code.exp
val singleton : Code.exp -> Code.exp
val cons : Code.exp -> Code.exp -> Code.exp
val append : Code.exp -> Code.exp -> Code.exp
val 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.pattern
val pattern : Parsetree.generator -> Code.pattern list -> Code.pattern
val pattern0 : Parsetree.generator -> Code.pattern
val pattern1 : Parsetree.generator -> Code.pattern -> Code.pattern
val pattern2 : Parsetree.generator -> Code.pattern -> Code.pattern -> Code.pattern
val genr_eq : string * Parsetree.type_declaration -> Code.structure_item
t
, 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_item
val clauses_of_side : Parsetree.relation_side ->
Code.clause -> Code.clause -> Code.clauses -> Code.clauses
val clauses_left_or_right : Parsetree.relation_side ->
Code.clause -> Code.clause -> Code.clauses -> Code.clauses
val clauses_both_as_left : Parsetree.relation_side ->
Code.clause -> Code.clause -> Code.clauses -> Code.clauses
val opt : bool -> Code.clause -> Code.clauses -> Code.clauses
val lazy_opt : bool -> (unit -> Code.clause) -> Code.clauses -> Code.clauses
val opts : bool -> Code.clauses -> Code.clauses -> Code.clauses
val map_of_direction : Parsetree.distributivity_direction -> ('a -> 'b) -> 'a list -> 'b list
map
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.t
List
module that is suitable for the
distributivity_direction
argument.
This identifier will be used in the generated code.val diese_line : Location.t -> int * string
val set_dline_trace : unit -> unit
val get_dline_trace : unit -> bool
.ml
files ?val set_comments : unit -> unit
val get_comments : unit -> bool
val trace_clause : int -> string -> Code.clause -> Code.clause
int
string