package coq
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=3cbfc1e1a72b16d4744f5b64ede59586071e31d9c11c811a0372060727bfd9c3
doc/coq-core.library/Summary/index.html
Module Summary
Source
This module registers the declaration of global tables, which will be kept in synchronization during the various backtracks of the system.
type 'a summary_declaration = {
freeze_function : marshallable:bool -> 'a;
(*freeze_function
*)true
is for marshalling to disk. * e.g. lazy must be forcedunfreeze_function : 'a -> unit;
init_function : unit -> unit;
}
Types of global Coq states. The 'a
type should be pure and marshallable by the standard OCaml marshalling function.
For tables registered during the launch of coqtop, the init_function
will be run only once, during an init_summaries
done at the end of coqtop initialization. For tables registered later (for instance during a plugin dynlink), init_function
is used when unfreezing an earlier frozen state that doesn't contain any value for this table.
Beware: for tables registered dynamically after the initialization of Coq, their init functions may not be run immediately. It is hence the responsibility of plugins to initialize themselves properly.
All-in-one reference declaration + summary registration. It behaves just as OCaml's standard ref
function, except that a declare_summary
is done, with name
as string. The init_function
restores the reference to its initial value. The freeze_function
can be overridden
Special summary for ML modules. This summary entry is special because its unfreeze may load ML code and hence add summary entries. Thus is has to be recognizable, and handled properly.
For global tables registered statically before the end of coqtop launch, the following empty init_function
could be used.
The type frozen
is a snapshot of the states of all the registered tables of the system.
Typed projection of the summary. Experimental API, use with CARE
Debug