1 (***********************************************************************)
5 (* Kim Nguyen, LRI UMR8623 *)
6 (* Université Paris-Sud & CNRS *)
8 (* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
9 (* Recherche Scientifique. All rights reserved. This file is *)
10 (* distributed under the terms of the GNU Lesser General Public *)
11 (* License, with the special exception on linking described in file *)
14 (***********************************************************************)
17 Time-stamp: <Last modified on 2013-03-04 23:05:14 CET by Kim Nguyen>
20 (** Implementation of generic hashconsing. *)
22 include module type of Hcons_sig
24 (** Output signature of the functor {!Hcons.Make} *)
26 module Make (H : Common_sig.HashedType) : S with type data = H.t
27 (** Functor building an implementation of hashconsed values for a given
28 implementation of {!Common_sig.HashedType}. Hashconsed values are
29 persistent: the are kept in memory even if no external reference
30 remain. Calling [init()] explicitely will reclaim the space.
33 module Weak (H : Common_sig.HashedType) : S with type data = H.t
34 (** Functor building an implementation of hashconsed values for a given
35 implementation of {!Common_sig.HashedType}. Hashconsed values have a
36 weak semantics: they may be reclaimed as soon as no external
37 reference to them exists. The space may still be reclaimed
38 explicitely by calling [init].
41 module PosInt : Abstract with type data = int and type t = int
42 (** Compact implementation of hashconsed positive integer that
43 avoids boxing. [PosInt.make v] raises [Invalid_argument] if