Module Names
This file defines a lot of different notions of names used pervasively in the kernel as well as in other places. The essential datatypes exported by this API are:
- Id.t is the type of identifiers, that is morally a subset of strings which only contains Unicode characters of the Letter kind (and a few more).
- Name.t is an ad-hoc variant of Id.t option allowing to handle optionally named objects.
- DirPath.t represents generic paths as sequences of identifiers.
- Label.t is an equivalent of Id.t made distinct for semantical purposes.
- ModPath.t are module paths.
- KerName.t are absolute names of objects in Coq.
Identifiers
module Id : sig ... endRepresentation and operations on identifiers.
module Name : sig ... endRepresentation and operations on identifiers that are allowed to be anonymous (i.e. "_" in concrete syntax).
Type aliases
module ModIdset : Util.Set.S with type S.elt = module_identmodule ModIdmap : Util.Map.ExtS with type key = module_ident and module Set := ModIdsetDirectory paths = section names paths
module DirPath : sig ... endmodule DPset : Util.Set.S with type S.elt = DirPath.tNames of structure elements
module Label : sig ... endUnique names for bound modules
module MBId : sig ... endmodule MBIset : Util.Set.S with type S.elt = MBId.tThe module part of the kernel name
module ModPath : sig ... endmodule MPset : Util.Set.S with type S.elt = ModPath.tThe absolute names of objects seen by kernel
module KerName : sig ... endmodule KNpred : Predicate.S with type elt = KerName.tConstant Names
module Constant : sig ... endmodule Cpred : Predicate.S with type elt = Constant.tThe
*_envmodules consider an order on user part of names the others consider an order on canonical part of names
module Cset : CSig.SetS with type elt = Constant.tmodule Cset_env : CSig.SetS with type elt = Constant.tmodule Cmap : Util.Map.ExtS with type key = Constant.t and module Set := CsetA map whose keys are constants (values of the
Constant.ttype). Keys are ordered wrt. "canonical form" of the constant.
module Cmap_env : Util.Map.ExtS with type key = Constant.t and module Set := Cset_envA map whose keys are constants (values of the
Constant.ttype). Keys are ordered wrt. "user form" of the constant.
Inductive names
module MutInd : sig ... endmodule Mindmap_env : CMap.ExtS with type key = MutInd.ttype inductive= MutInd.t * intDesignation of a (particular) inductive type.
type constructor= inductive * intDesignation of a (particular) constructor of a (particular) inductive type.
module Constrset : CSet.S with type S.elt = constructormodule Constrset_env : CSet.S with type S.elt = constructormodule Indmap_env : CMap.ExtS with type key = inductive and module Set := Indset_envmodule Constrmap_env : CMap.ExtS with type key = constructor and module Set := Constrset_envval ind_modpath : inductive -> ModPath.tval constr_modpath : constructor -> ModPath.tval ith_mutual_inductive : inductive -> int -> inductiveval ith_constructor_of_inductive : inductive -> int -> constructorval inductive_of_constructor : constructor -> inductiveval index_of_constructor : constructor -> intval eq_ind : inductive -> inductive -> boolval eq_user_ind : inductive -> inductive -> boolval eq_syntactic_ind : inductive -> inductive -> boolval ind_ord : inductive -> inductive -> intval ind_hash : inductive -> intval ind_user_ord : inductive -> inductive -> intval ind_user_hash : inductive -> intval ind_syntactic_ord : inductive -> inductive -> intval ind_syntactic_hash : inductive -> intval eq_constructor : constructor -> constructor -> boolval eq_user_constructor : constructor -> constructor -> boolval eq_syntactic_constructor : constructor -> constructor -> boolval constructor_ord : constructor -> constructor -> intval constructor_hash : constructor -> intval constructor_user_ord : constructor -> constructor -> intval constructor_user_hash : constructor -> intval constructor_syntactic_ord : constructor -> constructor -> intval constructor_syntactic_hash : constructor -> int
Hash-consing
val hcons_con : Constant.t -> Constant.tval hcons_mind : MutInd.t -> MutInd.tval hcons_ind : inductive -> inductiveval hcons_construct : constructor -> constructor
type 'a tableKey=|ConstKey of 'a|VarKey of Id.t|RelKey of Int.ttype inv_rel_key= intindex in the
rel_contextpart of environment starting by the end, inverse of de Bruijn indice
val eq_table_key : ('a -> 'a -> bool) -> 'a tableKey -> 'a tableKey -> boolval eq_constant_key : Constant.t -> Constant.t -> bool
Module paths
type module_path= ModPath.t=|MPfile of DirPath.t|MPbound of MBId.t|MPdot of ModPath.t * Label.t
module Projection : sig ... endGlobal reference is a kernel side type for all references together
module GlobRef : sig ... endtype evaluable_global_reference=|EvalVarRef of Id.t|EvalConstRef of Constant.tBetter to have it here that in Closure, since required in grammar.cma
val eq_egr : evaluable_global_reference -> evaluable_global_reference -> bool