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