Module Sidekick_base.ID

Unique Identifiers

type t

The opaque type of unique identifiers

val make : string -> t

make s creates a new identifier with name s and some internal information. It is different than any other identifier created before or after, even with the same name.

val makef : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a

makef "foo %d bar %b" 42 true is like make (Format.asprintf "foo %d bar %b" 42 true).

val copy : t -> t

Fresh copy of the identifier, distinct from it, but with the same name.

val id : t -> int

Unique integer counter for this identifier.

val to_string : t -> string

Print identifier.

val to_string_full : t -> string

Printer name and unique counter for this ID.

include Sidekick_util.Intf.EQ with type t := t
type t
val equal : t -> t -> bool
include Sidekick_util.Intf.ORD with type t := t
type t
val compare : t -> t -> int
include Sidekick_util.Intf.HASH with type t := t
type t
val hash : t -> int
include Sidekick_util.Intf.PRINT with type t := t
type t
val pp : t CCFormat.printer
val pp_name : t CCFormat.printer
module Map : CCMap.S with type Map.key = t
module Set : CCSet.S with type Set.elt = t
module Tbl : CCHashtbl.S with type Tbl.key = t