Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Lambdapi library management.
val log_lib : 'a Lplib.Base.outfmt -> 'a
module LibMap : sig ... end
Representation of the mapping from module paths to files.
lib_root
stores the result of the "--lib-root"
flag when given.
val lib_mappings : LibMap.t Timed.ref
lib_mappings
stores the specified mappings of library paths.
val iter : (Path.t -> string -> unit) -> unit
iter f
iterates f
on current mappings.
set_lib_root dir
sets the library root to directory dir
. The following directories are set sequentially, such that the active one is the last valid one
/usr/local/lib/lambdapi/lib_root/
$OPAM_SWITCH_PREFIX/lib/lambdapi/lib_root
$LAMBDAPI_LIB_ROOT/lib/lambdapi/lib_root
--lib-root
command line argument.val add_mapping : (Path.t * string) -> unit
add_mapping (mn, fn)
adds a new mapping from the module name mn
to the file name fn
if mn
is not already mapped and fn
is a valid directory. In case of failure the program terminates and a graceful error message is displayed.
val file_of_path : Path.t -> string
file_of_path mp
converts module path mp
into the corresponding "file path" (with no attached extension). It is assumed that lib_root
has been set, possibly with set_lib_root
.
is_valid_src_extension s
returns true
iff s
ends with lp_src_extension
or dk_src_extension
.
val path_of_file : (string -> string) -> string -> Path.t
path_of_file escape fname
computes the module path that corresponds to the filename fname
. escape
converts irregular path elements into escaped identifiers if needed.