Module ID

module ID: sig .. end

Unique Identifiers

An ID.t is a unique identifier (an integer) with a human-readable name. We use those to give names to variables that are not hashconsed (the hashconsing does not play nice with names)
Since 1.0


type t = private {
   id : int;
   name : string;
   mutable payload : exn list; (*
Use exn as an open type for user-defined payload
*)
}
val make : string -> t
Makes a fresh ID
val copy : t -> t
Copy with a new ID
val id : t -> int
val name : t -> string
val payload : t -> exn list
val add_payload : t -> exn -> unit
include Interfaces.HASH
include Interfaces.ORD
include Interfaces.PRINT

NOTE: default printer does not display the ID.id field
val pp_full : t CCFormat.printer
Prints the ID with its internal number
val pp_fullc : t CCFormat.printer
Prints the ID with its internal number colored in gray (better for readability). Only use for debugging.
val gensym : unit -> t
Generate a new ID with a new, unique name
module Map: CCMap.S  with type key = t
module Set: CCSet.S  with type elt = t
module Tbl: CCHashtbl.S  with type key = t