Module Dynamic


module Dynamic: sig .. end
Dynamic plug-ins: registration and use.

val default_path : unit -> string list

Registration


val register : plugin:string -> string -> 'a Type.t -> journalize:bool -> 'a -> 'a
register ~plugin name ty v registers v with the name name, the type ty and the plug-in plugin.
Raises Type.AlreadyExists if name already exists. In other words you cannot register a value with the same name twice.
Change in Boron-20100401: add the labeled argument "plugin"
Consult the Plugin Development Guide for additional details.

Access


exception Incompatible_type of string
exception Unbound_value of string
val get : plugin:string -> string -> 'a Type.t -> 'a
apply ~plugin name ty returns the value registered with the name name, the type ty and the plug-in plugin. This plug-in will be loaded if required.
Raises Consult the Plugin Development Guide for additional details.

Kernel materials


val object_file_extension : string
Object file extension used when loading a module. See function Dynamic.load_module.
Since Boron-20100401
val add_path : string -> unit
Add a path into the search paths.
val load_module : string -> unit
Load the module with the given name. The module is searched in search paths. Do nothing if dynamic loading is not available
val load_script : string -> unit
Compile then load the OCaml script with the given name. The file is searched in search paths. Do nothing if dynamic loading is not available.
Since Beryllium-20090601-beta1
val set_default : bool -> unit
Search in all the default directories iff the parameter is true.
Since Boron-20100401
module Main: sig .. end