Commits

camlspotter committed a9910b6

spot.ml update

Comments (0)

Files changed (3)

lib/hashSet.ml

-type 'a t = ('a, unit) Hashtbl.t (* poorman's implementation *)
-let create = Hashtbl.create
-let mem = Hashtbl.mem
-let add t k = if not (mem t k) then Hashtbl.add t k ()
-let remove = Hashtbl.remove
-

lib/hashSet.mli

-(* Poorman's implementation of polymorphic hash set *)
-type 'a t
-val create : int -> 'a t
-val mem : 'a t -> 'a -> bool
-val add : 'a t -> 'a -> unit
-val remove : 'a t -> 'a -> unit
-
 module Monad_intf = Monad_intf
 module Monad = Monad
 module Option = Option
+module Weaktbl = Weaktbl
+module Phantom = Phantom
+module Hashset = Hashset
+
 module List = struct
   include List
   include Xlist
 end
+
 module Format = struct
   include Format
   include Xformat
 end
+
 module Hashtbl = struct
   include Hashtbl
   include Xhashtbl
 end
+
 module String = struct
   include String
   include Xstring
 end
-module Weaktbl = Weaktbl
-module Phantom = Phantom
+
 module Lazy = struct
   include Lazy
   include Xlazy
 end
+
 module Filename = struct
   include Filename
   include Xfilename
   include Xunix
 end
 
-module Hashset = Hashset
-