Module Brzo_b0_ocamlpath
OCAMLPATH
support move to B0_care.
OCAMLPATH lookup
type t
The type for OCAMLPATH. Conceptually it's just a list of directories but for legacy reasons we need to carry a bit more information.
val get : ?search:B0_std.Fpath.t list -> B0_std.Fpath.t list option -> (t, string) Stdlib.result
get ocamlpath
isOk p
ifocamlpath
isSome ps
and otherwise:- If the
OCAMLPATH
environment variable is defined, its contents parsed according toFpath
.list_of_search_path. - If the
opam
tool is available[$(opam var lib); $(ocamlc -where)]
or[$(opam var lib)]
if$(ocamlc -where)
is included in it. - If the
opam
tool is not available$(ocamlc -where)
search
is given toOs
.Cmd.find to lookupocamlc
andopam
. In the last two cases the "ocaml" library name is mapped toocamlc -where
.- If the
val root_dirs : t -> B0_std.Fpath.t list
dirs
are the root directories of the OCAMLPATH.
val ocaml_lib_path : t -> B0_std.Fpath.t
ocaml_lib_path
is the path to the directory that should be called"ocaml"
in the OCAMLPATH. For systems installs where packages are installed inocamlc -where
(OCAMLPATH is undefined),ocamlc -where
is indirs
but"ocaml"
cannot be resolved by looking updirs
. This is the resolution that should be used for"ocaml"
.
val libs : t -> (B0_std.Fpath.Set.t, string) Stdlib.result
libs ocamlpath
are the library names available inocamlpath
. This is the set ofthe domain of logical directories in
ocamlpath
on the current file system. That is the set of directoriesDIR
that can be specified as+DIR
. The set has them without the+
.