package coq
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=73466e61f229b23b4daffdd964be72bd7a110963b9d84bd4a86bb05c5dc19ef3
doc/coq-core.library/Global/index.html
Module Global
Source
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 list
val add_constant :
?typing_flags:Declarations.typing_flags ->
Names.Id.t ->
Safe_typing.global_declaration ->
Names.Constant.t
val add_private_constant :
Names.Id.t ->
Univ.ContextSet.t ->
Safe_typing.side_effect_declaration ->
Names.Constant.t * Safe_typing.private_constants
val add_mind :
?typing_flags:Declarations.typing_flags ->
Names.Id.t ->
Entries.mutual_inductive_entry ->
Names.MutInd.t
Extra 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_resolver
val add_modtype :
Names.Id.t ->
Entries.module_type_entry ->
Declarations.inline ->
Names.ModPath.t
val add_include :
Entries.module_struct_entry ->
bool ->
Declarations.inline ->
Mod_subst.delta_resolver
Sections
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_resolver
val add_module_parameter :
Names.MBId.t ->
Entries.module_struct_entry ->
Declarations.inline ->
Mod_subst.delta_resolver
Queries in the global environment
val lookup_inductive :
Names.inductive ->
Declarations.mutual_inductive_body * Declarations.one_inductive_body
val lookup_pinductive :
Constr.pinductive ->
Declarations.mutual_inductive_body * Declarations.one_inductive_body
type indirect_accessor = {
access_proof : Declarations.cooking_info Opaqueproof.opaque -> (Constr.t * unit Opaqueproof.delayed_universes) option;
}
val force_proof :
indirect_accessor ->
Declarations.cooking_info Opaqueproof.opaque ->
Constr.t * unit Opaqueproof.delayed_universes
val body_of_constant :
indirect_accessor ->
Names.Constant.t ->
(Constr.constr * unit Opaqueproof.delayed_universes * Univ.AbstractContext.t)
option
Returns 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)
option
Same 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_library
val import :
Safe_typing.compiled_library ->
Univ.ContextSet.t ->
Safe_typing.vodigest ->
Names.ModPath.t
Misc
Function to get an environment from the constants part of the global * environment and a given context.