module Dynamic: sig
.. end
Dynamic plug-ins: registration and use.
val default_path : unit -> string list
Registration
exception Invalid_Name of string
val register : string -> 'a Type.t -> journalize:bool -> 'a -> 'a
register name ty v
registers
v
with the name
name
and the type
ty
.
RaisesInvalid_Name
if the given name is not
"name_of_module.name_of_function"
Type.AlreadyExists
if name
already exists. In other words you
cannot register a value with the same name twice.
Consult the Plugin Development Guide for additional details.
Access
val get : string -> 'a Type.t -> 'a
apply name ty
return the value registered with the
name
and the type
ty
.
RaisesType.Unbound_value
if name
was not previously registered.
Type.StringTbl.Incompatible_Type
if ty
is not compatible with
the use of the function
Consult the Plugin Development Guide for additional details.
val apply : string -> 'a Type.t -> 'a
Deprecated.Since Beryllium-20090601-beta1. Replaced by
Dynamic.get
.
Kernel materials
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
module Main: sig
.. end