jon.recoil.org

Module Odoc_odoc.ResolverSource

Management of the documentation environment.

This is the module which does the link between packages, directories and Odoc_xref2's needs.

Sourcetype t
Sourcetype named_root = string * Odoc_odoc.Fs.Directory.t
Sourcetype roots = {
  1. page_roots : Odoc_odoc.Resolver.named_root list;
  2. lib_roots : Odoc_odoc.Resolver.named_root list;
  3. current_lib : Odoc_odoc.Resolver.named_root option;
    (*

    The current -L.

    *)
  4. current_package : Odoc_odoc.Resolver.named_root option;
    (*

    The current -P.

    *)
  5. current_dir : Odoc_odoc.Fs.Directory.t;
    (*

    Directory containing the output for the current unit.

    *)
}
Sourceval create : important_digests:bool -> directories:Odoc_odoc.Fs.Directory.t list -> open_modules:string list -> roots:Odoc_odoc.Resolver.roots option -> Odoc_odoc.Resolver.t

Prepare the environment for a given list of include directories, page roots and library roots.

  • parameter important_digests

    indicate whether digests should be compared when odoc_xref2 tries to lookup or fetch a unit. It defaults to true.

Sourceval lookup_page : Odoc_odoc.Resolver.t -> string -> Odoc_model.Lang.Page.t option

Helpers for creating xref2 env.

Initialize the environment for compiling the given module.

Initialize the environment for linking the given module.

Initialize the environment for the given page.

Initialize the environment for the given implementation.

Initialize the environment for the given implementation.

Sourceval build_env_for_reference : Odoc_odoc.Resolver.t -> Odoc_xref2.Env.t

Initialize the environment for a reference.

Sourceval resolve_import : Odoc_odoc.Resolver.t -> string -> Odoc_model.Root.t option

Similar to Odoc_xref2.Env.lookup_root_module but save work by loading only the root. Only used when resolving imports, which are needed for the link-deps command.