package coq
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=583471c8ed4f227cb374ee8a13a769c46579313d407db67a82d202ee48300e4b
doc/coq-core.library/Global/index.html
Module GlobalSource
This module defines the global environment of Coq. The functions below are exactly the same as the ones in Safe_typing, operating on that global environment. add_* functions perform name verification, i.e. check that the name given as argument match those provided by Safe_typing.
Enriching the global environment
Changing the (im)predicativity of the system
Variables, Local definitions, constants, inductive types
val export_private_constants :
Safe_typing.private_constants ->
Safe_typing.exported_private_constant listval add_constant :
?typing_flags:Declarations.typing_flags ->
Names.Id.t ->
Safe_typing.global_declaration ->
Names.Constant.tval add_private_constant :
Names.Id.t ->
Univ.ContextSet.t ->
Safe_typing.side_effect_declaration ->
Names.Constant.t * Safe_typing.private_constantsval add_mind :
?typing_flags:Declarations.typing_flags ->
Names.Id.t ->
Entries.mutual_inductive_entry ->
Names.MutInd.tExtra universe constraints
Non-interactive modules and module types
val add_module :
Names.Id.t ->
Entries.module_entry ->
Declarations.inline ->
Names.ModPath.t * Mod_subst.delta_resolverval add_modtype :
Names.Id.t ->
Entries.module_type_entry ->
Declarations.inline ->
Names.ModPath.tval add_include :
Entries.module_struct_entry ->
bool ->
Declarations.inline ->
Mod_subst.delta_resolverSections
poly is true when the section should be universe polymorphic
Close the section and reset the global state to the one at the time when the section what opened.
Interactive modules and module types
val end_module :
Summary.frozen ->
Names.Id.t ->
(Entries.module_struct_entry * Declarations.inline) option ->
Names.ModPath.t * Names.MBId.t list * Mod_subst.delta_resolverval add_module_parameter :
Names.MBId.t ->
Entries.module_struct_entry ->
Declarations.inline ->
Mod_subst.delta_resolverQueries in the global environment
val lookup_inductive :
Names.inductive ->
Declarations.mutual_inductive_body * Declarations.one_inductive_bodyval lookup_pinductive :
Constr.pinductive ->
Declarations.mutual_inductive_body * Declarations.one_inductive_bodytype indirect_accessor = {access_proof : Opaqueproof.opaque -> (Constr.t * unit Opaqueproof.delayed_universes) option;
}val force_proof :
indirect_accessor ->
Opaqueproof.opaque ->
Constr.t * unit Opaqueproof.delayed_universesval body_of_constant :
indirect_accessor ->
Names.Constant.t ->
(Constr.constr * unit Opaqueproof.delayed_universes * Univ.AbstractContext.t)
optionReturns the body of the constant if it has any, and the polymorphic context it lives in. For monomorphic constant, the latter is empty, and for polymorphic constants, the term contains De Bruijn universe variables that need to be instantiated.
val body_of_constant_body :
indirect_accessor ->
Declarations.constant_body ->
(Constr.constr * unit Opaqueproof.delayed_universes * Univ.AbstractContext.t)
optionSame as body_of_constant but on constant_body.
Compiled libraries
val export :
output_native_objects:bool ->
Names.DirPath.t ->
Names.ModPath.t * Safe_typing.compiled_library * Nativelib.native_libraryval import :
Safe_typing.compiled_library ->
Univ.ContextSet.t ->
Safe_typing.vodigest ->
Names.ModPath.tMisc
Function to get an environment from the constants part of the global * environment and a given context.