package ocaml-base-compiler
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17
doc/compiler-libs.common/Load_path/index.html
Module Load_path
Management of include directories.
This module offers a high level interface to locating files in the load path, which is constructed from -I command line flags and a few other parameters.
It makes the assumption that the contents of include directories doesn't change during the execution of the compiler.
module Dir : sig ... endtype auto_include_callback =
(Dir.t -> string -> string option) ->
string ->
stringThe type of callback functions on for init ~auto_include
val no_auto_include : auto_include_callbackNo automatic directory inclusion: misses in the load path raise Not_found as normal.
val init : auto_include:auto_include_callback -> string list -> unitinit l is the same as reset (); List.iter add_dir (List.rev l)
val auto_include_otherlibs : (string -> unit) -> auto_include_callbackauto_include_otherlibs alert is a callback function to be passed to Load_path.init and automatically adds -I +lib to the load path after calling alert lib.
Locate a file in the load path. Raise Not_found if the file cannot be found. This function is optimized for the case where the filename is a basename, i.e. doesn't contain a directory separator.
Same as find, but search also for uncapitalized name, i.e. if name is Foo.ml, allow /path/Foo.ml and /path/foo.ml to match.
val add : Dir.t -> unitOld name for append_dir
val append_dir : Dir.t -> unitappend_dir d adds d to the end of the load path (i.e. at lowest priority.
val prepend_dir : Dir.t -> unitprepend_dir d adds d to the start of the load path (i.e. at highest priority.
val get : unit -> Dir.t listSame as get_paths (), except that it returns a Dir.t list.