Module Kernel_datatype.Rooted_Code_Annotation


module Rooted_Code_Annotation: Project.Datatype.S  with type t = rooted_code_annotation

include Project.Datatype.INPUT

Exportation of inputs (easier use of Datatype.Register).
val register_comparable : ?compare:(Project.t -> Project.t -> int) ->
?equal:(Project.t -> Project.t -> bool) ->
?hash:(Project.t -> int) -> unit -> unit
Allow to register a specific compare, equal and hash functions for the datatype.

hash and equal have to be compatible, that is: forall x y, equal x y ==> hash x = hash y.

Never call register_comparable is equivalent to call register_comparable ().

Note that, as usual in ocaml, the default values for equal and hash are not compatible for all datastructures (though for the most ones).

val is_comparable_set : unit -> bool
Returns false iff register_comparable has never been called.

Access to the functions registered by registered_comparable


val hash : Project.t -> int
val equal : Project.t -> Project.t -> bool
val compare : Project.t -> Project.t -> int
val mem_project : ((Project.project -> bool) -> Project.t -> bool) option Pervasives.ref
!mem_project must be Some g with g f x returning true iff x contains one project p such that f p returns true. !mem_project should be equal to None if there is no value of type project in x.
Since Boron-20100401