package coq
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=513e953b7183d478acb75fd6e80e4dc32ac1a918cf4343ac31a859cfb4e9aad2
doc/coq-core.library/Lib/index.html
Module LibSource
Lib: record of operations, backtrack, low-level sections
This module provides a general mechanism to keep a trace of all operations and to backtrack (undo) those operations. It provides also the section mechanism (at a low level; discharge is not known at this step).
type node = | Leaf of Libobject.t| CompilingLibrary of Nametab.object_prefix| OpenedModule of is_type * export * Nametab.object_prefix * Summary.frozen| OpenedSection of Nametab.object_prefix * Summary.frozen
Object iteration functions.
val open_atomic_objects :
Libobject.open_filter ->
int ->
Nametab.object_prefix ->
lib_atomic_objects ->
unitclassify_segment seg verifies that there are no OpenedThings, clears ClosedSections and FrozenStates and divides Leafs according to their answers to the classify_object function in three groups: Substitute, Keep, Anticipate respectively. The order of each returned list is the same as in the input list.
segment_of_objects prefix objs forms a list of Leafs
...
Low-level adding operations
...
Adding operations (which call the cache method, and getting the current list of operations (most recent ones coming first).
...
The function contents gives access to the current entire segment
The function contents_after returns the current library segment, starting from a given section path.
Functions relative to current path
User-side names
Kernel-side names
Are we inside an opened section
Are we inside an opened module type
Returns the opening node of a given name
Modules and module types
val start_module :
export ->
Names.module_ident ->
Names.ModPath.t ->
Summary.frozen ->
Nametab.object_prefixval start_modtype :
Names.module_ident ->
Names.ModPath.t ->
Summary.frozen ->
Nametab.object_prefixval end_module :
unit ->
Libobject.object_name
* Nametab.object_prefix
* Summary.frozen
* library_segmentval end_modtype :
unit ->
Libobject.object_name
* Nametab.object_prefix
* Summary.frozen
* library_segmentCompilation units
The function library_dp returns the DirPath.t of the current compiling library (or default_library)
Extract the library part of a name even if in a section
Sections
We can get and set the state of the operations (used in States).
Keep only the libobject structure, not the objects themselves
Section management for discharge
Discharge: decrease the section level if in the current section
val discharge_abstract_universe_context :
Declarations.abstr_info ->
Univ.AbstractContext.t ->
Univ.universe_level_subst * Univ.AbstractContext.t