10 val equal : t -> t -> bool
11 val stats : unit -> unit
18 type t = private { id : Uid.t;
25 val equal : t -> t -> bool
26 val stats : unit -> unit
29 module Make (H : Hashtbl.HashedType) : S with type data = H.t =
31 let uid_make,uid_current,uid_set = Uid.make_maker()
33 type t = { id : Uid.t;
39 let equal t1 t2 = t1 == t2
40 module WH = Weak.Make( struct
44 let equal a b = a == b || H.equal a.node b.node
46 let pool = WH.create MED_H_SIZE
48 exception Found of Uid.t
51 let cell = { id = Uid.dummy; key = H.hash x; node = x } in
56 let cell = { cell with id = uid_make(); } in
62 let l = WH.fold (fun cell acc -> (Uid.to_int cell.id)::acc) pool [] in
63 let l = List.sort compare l in
64 Logger.print Format.err_formatter "Hconsing statistics:@\n%a"
66 Pretty.pp_print_list ~sep:Format.pp_force_newline Format.pp_print_int ppf l) l