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 (***********************************************************************)
16 (** Implementation of generic hashconsing. *)
17 (** {directinclude true} *)
19 include module type of Hcons_sig
21 (** Output signature of the functor {!Hcons.Make} *)
23 module Make (H : Common_sig.HashedType) : S with type data = H.t
24 (** Functor building an implementation of hashconsed values for a given
25 implementation of {!Common_sig.HashedType}. Hashconsed values are
26 persistent: the are kept in memory even if no external reference
27 remain. Calling [init()] explicitely will reclaim the space.
30 module Weak (H : Common_sig.HashedType) : S with type data = H.t
31 (** Functor building an implementation of hashconsed values for a given
32 implementation of {!Common_sig.HashedType}. Hashconsed values have a
33 weak semantics: they may be reclaimed as soon as no external
34 reference to them exists. The space may still be reclaimed
35 explicitely by calling [init].
38 module PosInt : Abstract with type data = int and type t = int
39 (** Compact implementation of hashconsed positive integer that
40 avoids boxing. [PosInt.make v] raises [Invalid_argument] if