Module Nametab
type object_prefix={obj_dir : Names.DirPath.t;obj_mp : Names.ModPath.t;}Object prefix morally contains the "prefix" naming of an object to be stored by
library, whereobj_diris the "absolute" path,obj_mpis the current "module" prefix andobj_secis the "section" prefix.Thus, for an object living inside
Module A. Section B.the prefix would be:{ obj_dir = "A.B"; obj_mp = "A"; obj_sec = "B" }Note that both
obj_dirandobj_secare "paths" that is to say, as opposed toobj_mpwhich is a single module name.
val eq_op : object_prefix -> object_prefix -> bool
module GlobDirRef : sig ... endto this type are mapped
DirPath.t's in the nametab
exceptionGlobalizationError of Libnames.qualid
val error_global_not_found : info:Exninfo.info -> Libnames.qualid -> 'aRaises a globalization error
Register visibility of things
val map_visibility : (int -> int) -> visibility -> visibilityval push : visibility -> Libnames.full_path -> Names.GlobRef.t -> unitval push_modtype : visibility -> Libnames.full_path -> Names.ModPath.t -> unitval push_dir : visibility -> Names.DirPath.t -> GlobDirRef.t -> unitval push_syndef : visibility -> Libnames.full_path -> Globnames.syndef_name -> unit
module UnivIdMap : CMap.ExtS with type key = Univ.Level.UGlobal.tval push_universe : visibility -> Libnames.full_path -> Univ.Level.UGlobal.t -> unit
The following functions perform globalization of qualified names
val locate : Libnames.qualid -> Names.GlobRef.tval locate_extended : Libnames.qualid -> Globnames.extended_global_referenceval locate_constant : Libnames.qualid -> Names.Constant.tval locate_syndef : Libnames.qualid -> Globnames.syndef_nameval locate_modtype : Libnames.qualid -> Names.ModPath.tval locate_dir : Libnames.qualid -> GlobDirRef.tval locate_module : Libnames.qualid -> Names.ModPath.tval locate_section : Libnames.qualid -> Names.DirPath.tval locate_universe : Libnames.qualid -> Univ.Level.UGlobal.t
val global : Libnames.qualid -> Names.GlobRef.tval global_inductive : Libnames.qualid -> Names.inductive
val locate_all : Libnames.qualid -> Names.GlobRef.t listval locate_extended_all : Libnames.qualid -> Globnames.extended_global_reference listval locate_extended_all_dir : Libnames.qualid -> GlobDirRef.t listval locate_extended_all_modtype : Libnames.qualid -> Names.ModPath.t listval completion_canditates : Libnames.qualid -> Globnames.extended_global_reference listExperimental completion support, API is _unstable_
completion_canditates qualidwill return the list of global references that havequalidas a prefix. UI usually will want to compose this withshortest_qualid_of_global
val global_of_path : Libnames.full_path -> Names.GlobRef.tval extended_global_of_path : Libnames.full_path -> Globnames.extended_global_reference
These functions tell if the given absolute name is already taken
val exists_cci : Libnames.full_path -> boolval exists_modtype : Libnames.full_path -> boolval exists_dir : Names.DirPath.t -> boolval exists_universe : Libnames.full_path -> bool
These functions locate qualids into full user names
val full_name_cci : Libnames.qualid -> Libnames.full_pathval full_name_modtype : Libnames.qualid -> Libnames.full_pathval full_name_module : Libnames.qualid -> Names.DirPath.t
Reverse lookup
Finding user names corresponding to the given internal name
val path_of_syndef : Globnames.syndef_name -> Libnames.full_pathval path_of_global : Names.GlobRef.t -> Libnames.full_pathval dirpath_of_module : Names.ModPath.t -> Names.DirPath.tval path_of_modtype : Names.ModPath.t -> Libnames.full_pathval path_of_universe : Univ.Level.UGlobal.t -> Libnames.full_pathA universe_id might not be registered with a corresponding user name.
- raises Not_found
if the universe was not introduced by the user.
val dirpath_of_global : Names.GlobRef.t -> Names.DirPath.tval basename_of_global : Names.GlobRef.t -> Names.Id.tval pr_global_env : Names.Id.Set.t -> Names.GlobRef.t -> Pp.tPrinting of global references using names as short as possible.
- raises Not_found
when the reference is not in the global tables.
val shortest_qualid_of_global : ?loc:Loc.t -> Names.Id.Set.t -> Names.GlobRef.t -> Libnames.qualidval shortest_qualid_of_syndef : ?loc:Loc.t -> Names.Id.Set.t -> Globnames.syndef_name -> Libnames.qualidval shortest_qualid_of_modtype : ?loc:Loc.t -> Names.ModPath.t -> Libnames.qualidval shortest_qualid_of_module : ?loc:Loc.t -> Names.ModPath.t -> Libnames.qualidval shortest_qualid_of_universe : ?loc:Loc.t -> 'u Names.Id.Map.t -> Univ.Level.UGlobal.t -> Libnames.qualidIn general we have a
UnivNames.universe_bindersaround rather than aId.Set.t
Generic name handling
module type UserName = sig ... endmodule type EqualityType = sig ... endmodule type NAMETREE = sig ... end