(***********************************************************************) (* *) (* TAToo *) (* *) (* Kim Nguyen, LRI UMR8623 *) (* Université Paris-Sud & CNRS *) (* *) (* Copyright 2010-2012 Université Paris-Sud and Centre National de la *) (* Recherche Scientifique. All rights reserved. This file is *) (* distributed under the terms of the GNU Lesser General Public *) (* License, with the special exception on linking described in file *) (* ../LICENSE. *) (* *) (***********************************************************************) (* Time-stamp: *) (** This modules implements unique identifiers represented by integers *) type t = private int (** The type of unique identifiers. *) exception Overflow (** Raised when the internal counters for IDs overflows. *) val make_maker : unit -> (unit -> t) (** Returns an uid generator. [make_maker ()] returns a function that generates unique ids. Raises [Overflow] if the internal counter overflows. *) val dummy : t (** A dummy identifier, guaranteed to be distinct from any value returned by a generator. *) external to_int : t -> int = "%identity" (** Convert a unique id to an integer *) (**/**) external of_int : int -> t = "%identity" (** May break the invariant, use with caution *)