package rocq-runtime
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a45280ab4fbaac7540b136a6b073b4a6db15739ec1e149bded43fa6f4fc25f20
doc/rocq-runtime.vernac/Mltop/index.html
Module MltopSource
Toplevel management
Coq plugins are identified by their OCaml library name (in the Findlib sense)
type toplevel = {load_plugin : PluginSpec.t -> unit;(*Load a findlib library, given by public name
*)load_module : string -> unit;(*Load a cmxs / cmo module, used by the native compiler to load objects
*)add_dir : string -> unit;(*Adds a dir to the module search path
*)ml_loop : ?init_file:string -> unit -> unit;(*Run the OCaml toplevel with given addtitional initialisation file
*)
}Low level module loading, for the native compiler and similar users.
Removes the toplevel (if any)
Tests if an Ocaml toplevel runs under Coq
Starts the Ocaml toplevel loop
ML Dynlink
Adds a dir to the plugin search path, this also extends OCamlfind's search path
Tests if we can load ML files
Initialization functions
Declare a initialization function. The initialization function is called in Declare ML Module, including reruns after backtracking over it (either interactive backtrack, module closing backtrack, Require of a file with Declare ML Module).
Register a callback that will be called when the module is declared with the Declare ML Module command. This is useful to define Coq objects at that time only. Several functions can be defined for one module; they will be called in the order of declaration, and after the ML module has been properly initialized.
Unlike the init functions it does not run after closing a module or Requiring a file which contains the Declare ML Module. This allows to have effects which depend on the module when command was run in, eg add a named libobject which will use it for the prefix.
The callback runs in the synterp phase, use declare_cache_obj_full if you also need to interact with Interp state.
Register a callback with an interp phase.
Declaring modules
Implementation of the Declare ML Module vernacular command.