Module Brzo_b0_ocamlpath
OCAMLPATH support move to B0_care.
OCAMLPATH lookup
type tThe 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.resultget ocamlpathisOk pifocamlpathisSome psand otherwise:- If the
OCAMLPATHenvironment variable is defined, its contents parsed according toFpath.list_of_search_path. - If the
opamtool is available[$(opam var lib); $(ocamlc -where)]or[$(opam var lib)]if$(ocamlc -where)is included in it. - If the
opamtool is not available$(ocamlc -where)
searchis given toOs.Cmd.find to lookupocamlcandopam. In the last two cases the "ocaml" library name is mapped toocamlc -where.- If the
val root_dirs : t -> B0_std.Fpath.t listdirsare the root directories of the OCAMLPATH.
val ocaml_lib_path : t -> B0_std.Fpath.tocaml_lib_pathis 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 -whereis indirsbut"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.resultlibs ocamlpathare the library names available inocamlpath. This is the set ofthe domain of logical directories in
ocamlpathon the current file system. That is the set of directoriesDIRthat can be specified as+DIR. The set has them without the+.