X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Futils%2Fptset.ml;h=3de13bc79467d4e652a1b42bb59fcd5db5abc4c8;hb=1d78508dcb4d646f982e7ce09f8be00ec193cfda;hp=ee0370a12390e7c42e6c63e3571b51e524e5ecab;hpb=30bc0bb1291426e5e26eb2dee1ffc41e4c246349;p=tatoo.git diff --git a/src/utils/ptset.ml b/src/utils/ptset.ml index ee0370a..3de13bc 100644 --- a/src/utils/ptset.ml +++ b/src/utils/ptset.ml @@ -15,7 +15,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) (* Modified by Kim Nguyen *) @@ -26,10 +26,10 @@ INCLUDE "utils.ml" -include Sigs.PTSET +include Ptset_sig module type HConsBuilder = - functor (H : Sigs.AUX.HashedType) -> Hcons.S with type data = H.t + functor (H : Common_sig.HashedType) -> Hcons.S with type data = H.t module Builder (HCB : HConsBuilder) (H : Hcons.Abstract) : S with type elt = H.t = @@ -42,7 +42,7 @@ struct | Branch of int * int * 'a * 'a module rec Node : Hcons.S with type data = Data.t = HCB(Data) - and Data : Sigs.AUX.HashedType with type t = Node.t set = + and Data : Common_sig.HashedType with type t = Node.t set = struct type t = Node.t set let equal x y = @@ -52,7 +52,7 @@ struct | Branch(b1,i1,l1,r1), Branch(b2,i2,l2,r2) -> b1 == b2 && i1 == i2 && (Node.equal l1 l2) && (Node.equal r1 r2) - | _ -> false + | (Empty|Leaf _|Branch _), _ -> false let hash = function | Empty -> 0 @@ -84,8 +84,9 @@ struct let singleton k = leaf k let is_singleton n = - match Node.node n with Leaf _ -> true - | _ -> false + match Node.node n with + | Leaf _ -> true + | Branch _ | Empty -> false let mem (k:elt) n = let kid = Uid.to_int (H.uid k) in