module Rooted_Code_Annotation_Before_After:Project.Datatype.S
with type t = rooted_code_annotation before_after
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) -> unit -> unit
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.
compare
;equal
is fun x y -> compare x y = 0
if
compare
is provided; no default value otherwise.hash
is Hashtbl.hash;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
register_comparable
has never been called.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
.