package coq-core
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=9a35311acec2a806730b94ac7dceabc88837f235c52a14c026827d9b89433bd7fa9555a9fc6829aa49edfedb24c8bbaf1411ebf463b74a50aeb17cba47745b6b
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 =
| CompilingLibrary of Nametab.object_prefix
| OpenedModule of is_type * export * Nametab.object_prefix * Summary.frozen
| OpenedSection of Nametab.object_prefix * Summary.frozen
Extract the object_prefix
component. Note that it is the prefix of the objects *inside* this node, eg in Module M.
we have OpenedModule
with prefix containing M
.
type classified_objects = {
substobjs : Libobject.t list;
keepobjs : Libobject.t list;
anticipateobjs : Libobject.t list;
}
...
Low-level adding operations (does not cache)
...
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
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
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