module Odig:sig
..end
Consult the toplevel helpers and the Odig API.
Warning. Odig
is a work in progress. Do not expect these
APIs to be stable.
v0.0.3 — homepage
WARNING. Proof of concepts do not start using this in your scripts. For now only available in the bytecode toplevel.
To use the toplevel helpers simply bring the Odig
module
in your scope: type or add the following line to your
~/.ocamlinit
file.
#use "odig.top"
Take into account the following points:
Odig
favours loading the library archive.lib
is loaded, if there is a file called
lib_top_init.ml
at the same location that file is loaded aswell,
This can be prevented by using the ~init
argument of
load functions.ocamltoplevel.cma
, ocamlbytecomp.cma
, stdlib.cma
Odig.load_libs
and Odig.load_pkg
, library archives ending with _top.cma
are excluded from the libraries to load.
Some functions take a ~dir
argument that specifies a directory
where objects can be looked up in addition to packages. This
directory defaults to _build
or the value of the environment
value ODIG_TOP_LOCAL_DIR
. These load functions always first look up
for objects locally and then in packages.
val help : unit -> unit
help ()
shows help about odig's toplevel support.val status : unit -> unit
status
outputs information about Odig's toplevel loads.val reset : unit -> unit
reset
removes odig included directories and pretend all odig loaded
objects were not.val load : ?force:bool -> ?deps:bool -> ?init:bool -> ?dir:Fpath.t -> string -> unit
load ~force ~deps ~init ~dir "Mod"
loads and setups include directories
for the module Mod
found in dir
or in any package.
init
is true
(default) toplevel library initialisation files
are loaded.deps
is true
(default) objects that are needed by the
module are also loaded.force
is true
(defaults to false
) reloads any loaded
object that needs to be loaded.
Warning. Do not use this function in scripts, its outcome
depends on the package install state.
val load_libs : ?force:bool -> ?deps:bool -> ?init:bool -> ?dir:Fpath.t -> unit -> unit
load_libs ~force ~deps ~init ~dir ()
loads and setups include
directories for libraries found in dir
.
init
is true
(default) toplevel library initialisation files
are loaded.deps
is true
(default) objects that are needed by the
libraries are also loaded.force
is true
(defaults to false
) reloads any loaded
object that needs to be loaded.val load_pkg : ?silent:bool -> ?force:bool -> ?deps:bool -> ?init:bool -> string -> unit
load_pkg ~silent ~force ~deps ~init name
loads all the libraries of the
package named name
.
init
is true
(default) toplevel library
initialisation files are loaded.deps
is true
(default) objects in other packages that
are needed by the package libraries are also loaded.force
is true
(defaults to false
) reloads any loaded
object that needs to be loaded.silent
is true
loaded objects are not loggedmodule Cobj:sig
..end
module Conf:sig
..end
module Pkg:sig
..end
module Odoc:sig
..end
odoc
API documentation generation.
module Ocamldoc:sig
..end
ocamldoc
API documentation generation.
module Private:sig
..end