package merlin-lib

  1. Overview
  2. Docs
Merlin's libraries

Install

Dune Dependency

Authors

Maintainers

Sources

merlin-4.17.1-501.tbz
sha256=376707aa871f09e9639456d3fbe4b89a21c9ad75c774e94cbbbe67f842b0a500
sha512=a11ea4b8e3520b3ee41ae8198cda34b2816b8dfcdcb99350ef29689a7d62bb66d17ffa075c551aa56d521120b55e6db14a106a31f7b3970ed2aa07e1db3c9b88

doc/merlin-lib.ocaml_utils/Ocaml_utils/Load_path/index.html

Module Ocaml_utils.Load_pathSource

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.

Sourceval add_dir : string -> unit

Add a directory to the end of the load path (i.e. at lowest priority.)

Sourceval remove_dir : string -> unit

Remove a directory from the load path

Sourceval reset : unit -> unit

Remove all directories

Sourcemodule Dir : sig ... end
Sourcetype auto_include_callback = (Dir.t -> string -> string option) -> string -> string

The type of callback functions on for init ~auto_include

Sourceval no_auto_include : auto_include_callback

No automatic directory inclusion: misses in the load path raise Not_found as normal.

Sourceval init : auto_include:auto_include_callback -> string list -> unit

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

auto_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.

Sourceval get_paths : unit -> string list

Return the list of directories passed to add_dir so far.

Sourceval 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.

Sourceval 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.

Sourceval add : Dir.t -> unit

Old name for append_dir

  • deprecated
Sourceval append_dir : Dir.t -> unit

append_dir d adds d to the end of the load path (i.e. at lowest priority.

Sourceval prepend_dir : Dir.t -> unit

prepend_dir d adds d to the start of the load path (i.e. at highest priority.

Sourceval get : unit -> Dir.t list

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

OCaml

Innovation. Community. Security.