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-01-30 19:06:33 CET by Kim Nguyen>
20 (** This modules implements unique identifiers represented by integers *)
23 (** The type of unique identifiers. *)
26 (** Raised when the internal counters for IDs overflows. *)
28 val make_maker : unit -> (unit -> t)
29 (** Returns an uid generator.
30 [make_maker ()] returns a function that generates unique ids. Raises
31 [Overflow] if the internal counter overflows.
35 (** A dummy identifier, guaranteed to be distinct from any value
36 returned by a generator.
39 external to_int : t -> int = "%identity"
40 (** Convert a unique id to an integer *)
44 external of_int : int -> t = "%identity"
45 (** May break the invariant, use with caution *)