package coq
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=3cbfc1e1a72b16d4744f5b64ede59586071e31d9c11c811a0372060727bfd9c3
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 ->
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
val body_of_constant :
Opaqueproof.indirect_accessor ->
Names.Constant.t ->
(Constr.constr * unit Opaqueproof.delayed_universes * Univ.AUContext.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 :
Opaqueproof.indirect_accessor ->
Opaqueproof.opaque Declarations.constant_body ->
(Constr.constr * unit Opaqueproof.delayed_universes * Univ.AUContext.t)
option
Same as body_of_constant
but on Declarations.constant_body
.
Compiled libraries
val export :
?except:Future.UUIDSet.t ->
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.