module Ocsigen_loader:sig..end
Module Ocsigen_loader: Dynamic loading for Ocsigen.
Notes about Findlib usage:
exception Dynlink_error of string * exn
exception Findlib_error of string * exn
val section : Lwt_log_core.sectionuse Lwt_log.Section.set_level in order to debug
val translate : string -> stringtranslate filename translate .cmo/.cma extensions to .cmxs in
native mode, and .cmxs to .cmo (.cma if it exists) in bytecode
mode.
val set_init_on_load : bool -> unitIf set to true, the module initialization functions passed to
set_module_init_function will be executed directly. Otherwise,
they will have to be invoked using init_module at some later stage.
val loadfile : (unit -> unit) -> (unit -> unit) -> bool -> string -> unitloadfile pre post force file (dynamically) loads file. If
force is false, remember file so that it isn't loaded
twice. If the loading effectively occurs, pre (resp. post)
is called before (resp. after) the loading. post will be
called even if the loading fails.
val loadfiles : (unit -> unit) -> (unit -> unit) -> bool -> string list -> unitloadfiles pre post force file loads all the files, using
loadfile (fun () -> ()) (fun () -> ()) false for all the files
but the last one, and loadfile pre post force for the last one
(if any).
val set_module_init_function : string -> (unit -> unit) -> unitset_module_init_function name f registers the function f, which will
be used to initialize the module when init_module name is called.
val init_module : (unit -> unit) -> (unit -> unit) -> bool -> string -> unitinit_module pre post force name runs the init function for the module
name. If force is false, remember name so that the init function
isn't executed twice. If the function is executed, pre (resp. post)
is called before (resp. after) the loading. post will be
called even if the loading fails.
val get_ocamlpath : unit -> string listReturns the current Findlib library search path.
val set_ocamlpath : string list -> unitSets the current Findlib library search path. The OCaml standard library path and some site-specific paths are always implicitly added.
val add_ocamlpath : string -> unitAdds a path to the Findlib library search path.
val findfiles : string -> string listfindfiles pkg returns the list of files needed to load Findlib
package pkg, including dependencies. The archive files of
pkg will appear last in the returned result.