package ocaml-base-compiler

  1. Overview
  2. Docs
Official release 4.11.0

Install

Dune Dependency

Authors

Maintainers

Sources

4.11.0.tar.gz
sha256=060a26420ad868e192076138a103dbe28fa39d7a0a80f7db349a1d5143dea506

doc/ocamlcommon/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.

val add_dir : string -> unit

Add a directory to the load path

val remove_dir : string -> unit

Remove a directory from the load path

val reset : unit -> unit

Remove all directories

val init : string list -> unit

init l is the same as reset (); List.iter add_dir (List.rev l)

val get_paths : unit -> string list

Return the list of directories passed to add_dir so far, in reverse order.

val find : string -> string

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.

val find_uncap : string -> string

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.

module Dir : sig ... end
val add : Dir.t -> unit
val get : unit -> Dir.t list

Same as get_paths (), except that it returns a Dir.t list.

OCaml

Innovation. Community. Security.