Cleaned up every thing, prepared to remove deprecated interface.
[SXSI/xpathcomp.git] / ptset.ml
index 3185da4..4fc92d6 100644 (file)
--- a/ptset.ml
+++ b/ptset.ml
@@ -377,15 +377,25 @@ let from_list l = List.fold_left (fun acc e -> add e acc) empty l
 
 end
 
-module Int : S with type elt = int 
-  =
-  Make ( struct type t = int 
-               type data = t
-               external hash : t -> int = "%identity"
-               external uid : t -> int = "%identity"
-               let equal : t -> t -> bool = (==)
-               external make : t -> int = "%identity"
-               external node : t -> int = "%identity"
-                 
-        end
-       ) 
+module Int : sig
+  include S with type elt = int
+  val print : Format.formatter -> t -> unit
+end
+  = 
+struct
+  include Make ( struct type t = int 
+                       type data = t
+                       external hash : t -> int = "%identity"
+                       external uid : t -> int = "%identity"
+                       let equal : t -> t -> bool = (==)
+                       external make : t -> int = "%identity"
+                       external node : t -> int = "%identity"
+                         
+                end
+              ) 
+  let print ppf s = 
+    Format.pp_print_string ppf "{ ";
+    iter (fun i -> Format.fprintf ppf "%i " i) s;
+    Format.pp_print_string ppf "}";
+    Format.pp_print_flush ppf ()
+ end