Module Mltop
Toplevel management
type toplevel
=
{
load_obj : string -> unit;
use_file : string -> unit;
add_dir : string -> unit;
ml_loop : unit -> unit;
}
If there is a toplevel under Coq, it is described by the following record.
val set_top : toplevel -> unit
Sets and initializes a toplevel (if any)
ML Dynlink
type vo_path_spec
=
{
unix_path : string;
coq_path : Names.DirPath.t;
implicit : bool;
has_ml : add_ml;
}
type coq_path_spec
=
|
VoPath of vo_path_spec
|
MlPath of string
type coq_path
=
{
path_spec : coq_path_spec;
recursive : bool;
}
val add_coq_path : coq_path -> unit
val add_known_module : string -> unit
List of modules linked to the toplevel
Initialization functions
val add_known_plugin : (unit -> unit) -> string -> unit
Declare a plugin and its initialization function. A plugin is just an ML module with an initialization function. Adding a known plugin implies adding it as a known ML module. The initialization function is granted to be called after Coq is fully bootstrapped, even if the plugin is statically linked with the toplevel
val declare_cache_obj : (unit -> unit) -> string -> unit
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.
Declaring modules
val declare_ml_modules : Vernacexpr.locality_flag -> string list -> unit