Syncom.Identifier
String identifiers.
An identifier is a string with a location. The string may contain a '#'
prefix for parameter variables or a '$'
prefix for substitution variables.
Identifiers are totally ordered for efficient lookups in map data structures.
For identifiers prefixed by modules, see Qualified_identifier
.
val make : ?location:Location.t -> Support.String.t -> t
val location : t -> Location.t
val name : t -> Support.String.t
exception Unbound_identifier of t
module Hashtbl : Support.Hashtbl.S with type key = t
val find_duplicates :
t Support.List.t ->
(t * t Support.List2.t) Support.List1.t Support.Option.t
include Support.Eq.EQ with type t := t
include Support.Ord.ORD with type t := t
compare a b
compares a
and b
for ordering.
compare a b < 0
if a
precedes b
(denoted a < b
),compare a b = 0
if a
is equal to b
(denoted a = b
),compare a b > 0
if a
succeeds b
(denoted a > b
).This should satisfy the following properties:
(compare a b <= 0 || compare b a >= 0) = true
,(compare a b <= 0) = true
and (compare b c <= 0) = true
, then (compare a c <= 0) = true
,(compare a a = 0) = true
,(compare a b <= 0) = true
and (compare a b >= 0) = true
then (compare a b = 0) = true
.include Support.Eq.EQ with type t := t
equal a b
is true
if and only if a
and b
are equal. This should satisfy the following properties:
equal a a = true
equal a b
is equivalent to equal b a
equal a b = true
and equal b c = true
, then equal a c = true
include Support.Show.SHOW with type t := t
val pp : Support.Format.formatter -> t -> unit
pp ppf t
emits t
pretty-printed to ppf
.
val show : t -> string
show t
pretty-prints t
to a string.