X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=ptset.mli;h=27b63325d2b885621cf4a8d78f59272c76c0e693;hb=df5fdb22632be887ecd9f5c46a014e7e970148a2;hp=3b46f5c777b0bffaf9864c9f92c864e419d35cad;hpb=04639fe524ee20f7f84c8b08387312d714c9bd56;p=SXSI%2Fxpathcomp.git diff --git a/ptset.mli b/ptset.mli index 3b46f5c..27b6332 100644 --- a/ptset.mli +++ b/ptset.mli @@ -26,8 +26,18 @@ module type S = sig type elt - type data - type t + + type 'a node + module rec Node : sig + include Hcons.S with type data = Data.t + end + and Data : sig + include + Hashtbl.HashedType with type t = Node.t node + end + type data = Data.t + type t = Node.t + val empty : t val is_empty : t -> bool val mem : elt -> t -> bool @@ -63,11 +73,13 @@ val intersect : t -> t -> bool val is_singleton : t -> bool val mem_union : t -> t -> t val hash : t -> int -val uid : t -> int +val uid : t -> Uid.t val uncons : t -> elt * t val from_list : elt list -> t val make : data -> t val node : t -> data + +val with_id : Uid.t -> t end @@ -75,4 +87,5 @@ module Int : sig include S with type elt = int val print : Format.formatter -> t -> unit end -module Make ( H : Hcons.S ) : S with type elt = H.t + +module Make ( H : Hcons.SA ) : S with type elt = H.t