module Datatype:Project.Datatype.S
with type t = tt
include Project.Datatype.INPUT
Datatype.Register
).val register_comparable : ?compare:(Project.t -> Project.t -> int) ->
?equal:(Project.t -> Project.t -> bool) ->
?hash:(Project.t -> int) -> ?physical_hash:(Project.t -> int) -> unit -> unit
compare
, equal
, hash
and
physical_hash
functions for the datatype.
hash
and equal
have to be compatible, that is:
forall x y, equal x y ==> hash x = hash y.
physical_hash
has to be compatible with physical equality (==),
that is:
forall x y, x == y ==> physical_hash x = physical_hash y.
compare
;equal
is fun x y -> compare x y = 0
if
compare
is provided; no default value otherwise.hash
is Hashtbl.hash;physical_hash
is hash
if it is provided;
Hashtbl.hash
otherwise.registered_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
register_comparable
has never been called.registered_comparable
val hash : Project.t -> int
val physical_hash : Project.t -> int
val equal : Project.t -> Project.t -> bool
val compare : Project.t -> Project.t -> int
val contain_project : (Project.project -> Project.t -> bool) option Pervasives.ref