package coq
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=3cbfc1e1a72b16d4744f5b64ede59586071e31d9c11c811a0372060727bfd9c3
doc/coq-core.library/Lib/index.html
Module Lib
Source
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 ->
unit
classify_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_prefix
val start_modtype :
Names.module_ident ->
Names.ModPath.t ->
Summary.frozen ->
Nametab.object_prefix
val end_module :
unit ->
Libobject.object_name
* Nametab.object_prefix
* Summary.frozen
* library_segment
val end_modtype :
unit ->
Libobject.object_name
* Nametab.object_prefix
* Summary.frozen
* library_segment
Compilation 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 :
Section.abstr_info ->
Univ.AUContext.t ->
Univ.universe_level_subst * Univ.AUContext.t