Module Dynamic


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.
Raises 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.
Raises 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