package uniq

  1. Overview
  2. Docs

Module Uniq_metaSource

Sourcemodule Assoc : sig ... end
Sourcemodule Path : sig ... end
Sourcetype t
Sourceval pp : t Fmt.t
Sourceval parser : Fpath.t -> (t list, [> `Msg of string ]) result

Search the META file for the given path.

Sourceval to_artifacts : (Fpath.t * Assoc.t) list -> (Uniq_info.t list, [> `Msg of string ]) result

Synthesis all artifacts described into the given META files into Uniq_info.t values.

Sourceval find_providers : roots:Fpath.t list -> ?predicates:string list -> Modname.t list -> (Modname.t * Path.t list) list
Sourcetype archive =
  1. | Stdlib of Fpath.t
  2. | Library of Path.t * Fpath.t * Assoc.t
Sourcetype package
Sourceval packages_with_archive : ?predicates:string list -> Fpath.t list -> package list
Sourceval from_cmi_to_impl : roots:Fpath.t list -> packages:package list -> ?stdlib:Fpath.t -> ?disambiguate:(Modname.t -> Path.t list -> Path.t) -> Fpath.t -> (archive option, [> `Msg of string ]) result

from_cmi_to_impl ~roots cmi associates the given cmi artifact with the ocamlfind package that ships it. It returns the package's Path.t, the directory holding its META file and its descriptor — a triple whose (directory, descriptor) projection is directly consumable by to_artifacts to obtain the implementation archives. It returns None when no package under roots owns the cmi (e.g. a project-local unit).

The association is done by directory first (the cmi physically lives in its package's directory) and falls back to an interface digest comparison when the directory is ambiguous or does not match.

stdlib, when provided, is the OCaml standard library directory (e.g. from the compiler configuration of the chosen toolchain). A cmi sitting there is associated with the synthetic stdlib package, since the standard library ships no META file.

Sourceval archives_of : roots:Fpath.t list -> ?predicates:string list -> archive -> (Uniq_info.t list, [> `Msg of string ]) result

/

Sourceval ancestors : roots:Fpath.t list -> ?predicates:string list -> Path.t -> ((Path.t * Fpath.t * Assoc.t) list, [> `Msg of string ]) result