package coq-core
Install
Dune Dependency
Authors
Maintainers
Sources
md5=8d852367b54f095d9fbabd000304d450
sha512=46922d5f2eb6802a148a52fd3e7f0be8370c93e7bc33cee05cf4a2044290845b10ccddbaa306f29c808e7c5019700763e37e45ff6deb507b874a4348010fed50
doc/coq-core.sysinit/Coqinit/index.html
Module Coqinit
Source
Main etry point to the sysinit component, all other modules are private.
The following API shoud be called in order, and the first 3 steps only once since they initialize global data. On the contrary step 4 can be called many times to init the compilation of a unit.
1 initialization of OCaml's runtime
Profiling, GC parameters and signals. Nothing specific to Coq per se, but the defaults here are good for Coq. This API should be called up very early, or not at all.
val parse_arguments :
parse_extra:(string list -> 'a * string list) ->
usage:Boot.Usage.specific_usage ->
?initial_args:Coqargs.t ->
unit ->
Coqargs.t * 'a
2 parsing of Sys.argv
This API parses command line options which are known by Coq components. Ideally it is functional, but some values in the `Flags` modules are set on the spot instead of being represented as "injection commands" (a field of Coqargs.t).
parse_extra
and usage
can be used to parse/document more options.
3 initialization of global runtime data
All global setup is done here, like COQLIB and the paths for native compilation. If Coq is used to process multiple libraries, what is set up here is really global and common to all of them.
The returned injections are options (as in "Set This Thing" or "Require that") as specified on the command line. The prelude is one of these (unless "-nois" is passed).
This API must be called, typically jsut after parsing arguments.
4 Start a library (sets options and loads objects like the prelude)
Given the logical name top
of the current library and the set of initial options and required libraries, it starts its processing (see also Declaremods.start_library)