Syncom.Qualified_identifierNamespaced identifiers.
These are names for referring to bound names nested in namespaces.
Qualified identifiers may be prefixed by the namespaces that need to be opened in order to bring the referred constant in the current scope. The parts of a qualified identifier are delimited by '.'.
For instance, if z is an LF term-level constant, then the following are qualified identifiers:
zNat.zUtil.Nat.zval make :
?location:Location.t ->
?namespaces:Identifier.t Support.List.t ->
Identifier.t ->
tmake ?location ?namespaces name is the qualified identifier having location location, namespaces namespaces and name name.
The namespaces in namespaces are expected to be in order of appeareance as in the external syntax. That is, the qualified identifier qid = Util.Nat.z has namespaces qid = ["Util"; "Nat"].
location is unspecified and namespaces = [], then the location is that of name.location is unspecified and namespaces <> [], then the location is the union of the locations for each module in namespaces and the location of name.val make_simple : Identifier.t -> tmake_simple name is make name.
val prepend_module : Identifier.t -> t -> tprepend_module module_ qid is the qualified name derived from qid with module_ prepended to it.
val location : t -> Location.tlocation qid is the location of qid.
val namespaces : t -> Identifier.t Support.List.tnamespaces qid is the module prefixes of qid.
For instance, if qid = Util.Nat.z, then namespaces qid = ["Util"; "Nat"].
val name : t -> Identifier.tname qid is the identifier in the tail end position of qid.
For instance, if qid = Util.Nat.z, then name qid = "z".
exception Unbound_qualified_identifier of texception Unbound_namespace of tval from_list1 : Identifier.t Support.List1.t -> tfrom_list1 (x1, [x2; x3; ...; xn]) is the qualified identifier with namespaces [x1; x2; ...; x(n-1)] and name xn.
val to_list1 : t -> Identifier.t Support.List1.tto_list1 id is the non-empty list (x1, [x2; x3; ...; xn]) where [x1; x2; ...; x(n-1)] are the namespaces of id, and xn is the name of id.
Equality of qualified identifiers by namespaces and names. Locations are ignored.
include Support.Eq.EQ with type t := tLexicographical ordering of qualified identifiers.
include Support.Ord.ORD with type t := tcompare 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 := tequal a b is true if and only if a and b are equal. This should satisfy the following properties:
equal a a = trueequal a b is equivalent to equal b aequal a b = true and equal b c = true, then equal a c = trueinclude Support.Show.SHOW with type t := tval pp : Support.Format.formatter -> t -> unitpp ppf t emits t pretty-printed to ppf.
val show : t -> stringshow t pretty-prints t to a string.