module Identifier: sig
.. end
Opaque identifiers that can be freshly constructed.
type
t
t
is an identifier that is internally represented as a string and
an optional integer.
val fresh : string -> t
Creates a new identifier with a unique internal number:
fresh x <> fresh x
.
val from_string : string -> t
Creates a new identifier without a unique number:
from_string x = from_string x
. This is useful while parsing.
val to_string : t -> string
to_string (from_string x) = x
, but to_string (fresh x) = x#n
where
n
is a unique number
val fresh_from : t -> t
fresh_from x
creates a fresh identifier with the same string as x
but a new, unique number.
val compare : t -> t -> int
module Set: Set.S
with type elt = t
module Map: Map.S
with type key = t