package ocsigenserver
Install
Dune Dependency
Authors
Maintainers
Sources
md5=5ea779e418bf936d7301057d6d95011c
sha512=e27b9ad71ac2bd0e817ff35b66de606ffabd5b71b88b34974cbf41181e5a824767616fdd2b7908539bdd394c0873aaacdc7768f6dc7ad3f9dc33e8eb1a6f9fa6
doc/ocsigenserver.baselib/Ocsigen_loader/index.html
Module Ocsigen_loader
Source
Module Ocsigen_loader
: Dynamic loading for Ocsigen.
Notes about Findlib usage:
- Findlib is called with predicates "plugin", "mt". Moreover, the predicate "native" or "byte" is added, depending on whether Ocsigen is running in native or bytecode mode.
- In native mode, .cmx/.cmxa extensions provided by META files are replaced by .cmxs.
- The OCAMLPATH environment variable is ignored altogether.
translate filename
translate .cmo/.cma extensions to .cmxs in native mode, and .cmxs to .cmo (.cma if it exists) in bytecode mode.
If 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.
loadfile 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.
loadfiles 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).
set_module_init_function name f
registers the function f
, which will be used to initialize the module when init_module name
is called.
init_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.
Returns the current Findlib library search path.
Sets the current Findlib library search path. The OCaml standard library path and some site-specific paths are always implicitly added.
Adds a path to the Findlib library search path.
findfiles 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.