module Findlib : sig val package_directory : string -> string val package_property : string list -> string -> string -> string val package_ancestors : string list -> string -> string list val package_deep_ancestors : string list -> string list -> string list val default_location : unit -> string (* Note: This signature is incomplete. See findlib.mli for the * full signature. *) end
The Findlib module is part of the "findlib" package. In order to link it in, it is sufficient to link "findlib" in, e.g.
ocamlfind ocamlc options -package findlib -linkpkg options
There are archives for the bytecode compiler and for the native compiler; for single-threaded and for multi-threaded applications, and there is a special addition for toploops.
The Findlib module is the primary interface of the findlib library. It contains functions to lookup packages, to interpret META[File that specifies metainformation of OCaml packages] files, and to determine the ancestors of packages.
val package_directory : string -> string
Gets the absolute path of the directory where the package pkg is stored. The exception Not_found is raised if the package could not be found. Other exceptions may occur as file I/O is done.
val package_property : string list -> string -> string -> string
Determines the value of the variable defined in the META[File that specifies metainformation of OCaml packages] file of package pkg with the given set of predicates. The exception Not_found is raised if the package or the variable could not be found. Other exceptions may occur as file I/O is done.
val package_ancestors : string list -> string -> string list
Determines the direct ancestors of package pkg for the set of predicates. The returned list has no specific order. The exception Not_found is raised if the package could not be found. The exception Failure is raised if one of the ancestors could not be found, or if a circular dependency has been detected. Other exceptions may occur as file I/O is done.
val package_deep_ancestors : string list -> string list -> string list
Determines the list of direct or indirect ancestors of the packages in pkglist for the set of predicates. The returned list is topologically sorted. The exception Not_found is raised if the package could not be found. The exception Failure is raised if one of the ancestors could not be found, or if a circular dependency has been detected. Other exceptions may occur as file I/O is done.