module Gen:sig..end
val string_of_ctyp : Camlp4.PreCast.Ast.ctyp -> string
val regular_constr_of_revised_constr : string -> string
val exApp_of_list : Camlp4.PreCast.Ast.expr list -> Camlp4.PreCast.Ast.exprexpr_app_of_list l takes list l of expressions e1; e2; e3; ...
and returns the expression e1 e2 e3. C.f.: Ast.exSem_of_list.
val tyArr_of_list : Camlp4.PreCast.Ast.ctyp list -> Camlp4.PreCast.Ast.ctyptyArr_of_list l takes list l of types e1; e2; e3; ... and
returns the type e1 -> e2 -> e3. C.f.: Ast.exSem_of_list.
val paOr_of_list : Camlp4.PreCast.Ast.patt list -> Camlp4.PreCast.Ast.pattpaOr_of_list l takes list l of patterns p1; p2; p3; ... and returns
the pattern p1 | p2 | p3 | ...
val gensym : ?prefix:string -> unit -> stringgensym ?prefix () generates a fresh variable name with prefix.
When used with the default parameters, it will return: _x__001,
_x__002, _x__003, ...
prefix : default = "_x"val error : Camlp4.PreCast.Ast.ctyp -> fn:string -> msg:string -> 'aerror tp ~fn ~msg raises an error with msg on type tp occuring
in function fn.
val unknown_type : Camlp4.PreCast.Ast.ctyp -> string -> 'aunknown_type tp fn type tp cannot be handled by function fn.
val ty_var_list_of_ctyp : Camlp4.PreCast.Ast.ctyp -> string list -> string listty_var_list_of_ctyp tp acc accumulates a list of type parameters
contained in tp into acc as strings.
val get_rev_id_path : Camlp4.PreCast.Ast.ident -> string list -> string listget_rev_id_path id acc takes an identifier.
acc.val ident_of_rev_path : Camlp4.PreCast.Ast.Loc.t -> string list -> Camlp4.PreCast.Ast.identident_of_rev_path loc path takes a location loc and a reversed path
rev_path to an identifier.
val get_appl_path : Camlp4.PreCast.Ast.Loc.t ->
Camlp4.PreCast.Ast.ctyp -> Camlp4.PreCast.Ast.identget_appl_path loc tp
val abstract : Camlp4.PreCast.Ast.Loc.t ->
Camlp4.PreCast.Ast.patt list ->
Camlp4.PreCast.Ast.expr -> Camlp4.PreCast.Ast.exprabstract loc patts body takes a location loc, a pattern list
patts, and an expression body.
body.val apply : Camlp4.PreCast.Ast.Loc.t ->
Camlp4.PreCast.Ast.expr ->
Camlp4.PreCast.Ast.expr list -> Camlp4.PreCast.Ast.exprapply loc f_expr arg_exprs takes a location loc, an expression
f_expr representing a function, and a list of argument expressions
arg_exprs.
val switch_tp_def : alias:(Camlp4.PreCast.Ast.Loc.t -> Camlp4.PreCast.Ast.ctyp -> 'a) ->
sum:(Camlp4.PreCast.Ast.Loc.t -> Camlp4.PreCast.Ast.ctyp -> 'a) ->
record:(Camlp4.PreCast.Ast.Loc.t -> Camlp4.PreCast.Ast.ctyp -> 'a) ->
variants:(Camlp4.PreCast.Ast.Loc.t -> Camlp4.PreCast.Ast.ctyp -> 'a) ->
mani:(Camlp4.PreCast.Ast.Loc.t ->
Camlp4.PreCast.Ast.ctyp -> Camlp4.PreCast.Ast.ctyp -> 'a) ->
nil:(Camlp4.PreCast.Ast.Loc.t -> 'a) -> Camlp4.PreCast.Ast.ctyp -> 'aswitch_tp_def ~alias ~sum ~record ~variants ~mani tp_def
takes a handler function for each kind of type definition and
applies the appropriate handler when tp_def matches.
val mk_expr_lst : Camlp4.PreCast.Ast.Loc.t ->
Camlp4.PreCast.Ast.expr list -> Camlp4.PreCast.Ast.exprmk_expr_lst loc expr_list takes a list of expressions.
val mk_patt_lst : Camlp4.PreCast.Ast.Loc.t ->
Camlp4.PreCast.Ast.patt list -> Camlp4.PreCast.Ast.pattmk_patt_lst _loc patt_list takes a list of patterns.
val get_tparam_id : Camlp4.PreCast.Ast.ctyp -> stringget_tparam_id tp
Failure otherwise.tp if it is a type parameter.val type_is_recursive : ?stop_on_functions:bool ->
?short_circuit:(Camlp4.PreCast.Ast.ctyp -> bool option) ->
string -> Camlp4.PreCast.Ast.ctyp -> booltype_is_recursive ?short_circuit id tp
tp with name id
refers to itself, assuming that it is not mutually recursive with
another type.stop_on_functions : allows to disregard the recursive occurences appearing in
arrow types. The default is to disregard them.short_circuit : allows you to override the search for certain
type expressions.val drop_variance_annotations : Camlp4.PreCast.Ast.ctyp -> Camlp4.PreCast.Ast.ctypdrop_variance_annotations tp
tp.val find_record_default : Camlp4.PreCast.Ast.Loc.t -> Camlp4.PreCast.Ast.expr optionfind_record_default loc
loc if defined.val delay_sig_item : Camlp4.PreCast.Ast.sig_item -> unitdelay_sig_item item places item at the end of the current signature