module type Make_input = sig
.. end
Input signature of Datatype.Make
and Datatype.Make_with_collections
.
Values to implement in order to get a datatype.
Feel free to use easy builders (see above) for easy implementation.
type
t
Type for this datatype
val name : string
Unique name for this datatype.
If the name is a valid ocaml module name, then it must really corresponds
to the module name you are defining by applying the functor.
Otherwise, put the name you want as long as it does not clash with any
other datatype name.
val rehash : t -> t
How to rehashconsed values. Must be
Datatype.identity
if you does not use
hashconsing. Only useful for unmarshaling (use
undefined for
unmarshable type
).
All the above operations have the same semantics than the corresponding
value specified in module type Datatype.S
.
val structural_descr : Structural_descr.t
val reprs : t list
Must be non-empty.
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val copy : t -> t
val internal_pretty_code : Type.precedence -> Format.formatter -> t -> unit
val pretty : Format.formatter -> t -> unit
val varname : t -> string
val mem_project : (Project_skeleton.t -> bool) -> t -> bool