Module Odoc_xref2.EnvSource

Sourcetype lookup_unit_result =
  1. | Forward_reference
  2. | Found of Odoc_model.Lang.Compilation_unit.t
  3. | Not_found
Sourcetype lookup_page_result = Odoc_model.Lang.Page.t option
Sourcetype resolver = {
  1. open_units : string list;
  2. lookup_unit : string -> lookup_unit_result;
  3. lookup_page : string -> lookup_page_result;
}
Sourcetype lookup_type =
  1. | Module of Odoc_model.Paths.Identifier.Path.Module.t
  2. | ModuleType of Odoc_model.Paths.Identifier.ModuleType.t
  3. | RootModule of string * [ `Forward | `Resolved of Digest.t ] option
  4. | ModuleByName of string * Odoc_model.Paths.Identifier.Path.Module.t
  5. | FragmentRoot of int
Sourceval pp_lookup_type_list : Format.formatter -> lookup_type list -> unit
Sourcetype t
Sourceval is_linking : t -> bool
Sourceval with_recorded_lookups : t -> (t -> 'a) -> LookupTypeSet.t * 'a
Sourceval set_resolver : t -> resolver -> t
Sourceval has_resolver : t -> bool
Sourceval id : t -> int
Sourceval empty : t
Sourceval add_fragment_root : Component.Signature.t -> t -> t
Sourceval add_docs : Odoc_model.Comment.docs -> t -> t
Sourceval add_comment : Odoc_model.Comment.docs_or_stop -> t -> t
Sourceval add_module_type_functor_args : Component.ModuleType.t -> Odoc_model.Paths.Identifier.ModuleType.t -> t -> t
Sourceval lookup_fragment_root : t -> (int * Component.Signature.t) option
Sourceval lookup_page : string -> t -> Odoc_model.Lang.Page.t option
Sourceval lookup_unit : string -> t -> lookup_unit_result option
Sourceval lookup_root_module : string -> t -> root option
Sourcetype 'a scope constraint 'a = [< Component.Element.any ]

Target of a lookup

Sourcetype 'a maybe_ambiguous = ('a, [ `Ambiguous of 'a * 'a list | `Not_found ]) Result.result
Sourceval lookup_by_name : 'a scope -> string -> t -> 'a maybe_ambiguous

Lookup an element in Env depending on the given scope. Return Error (`Ambiguous _) when two or more elements match the given scope and name.

Like lookup_by_name but use an identifier as key.

Sourceval add_functor_parameter : Odoc_model.Lang.FunctorParameter.t -> t -> t
Sourceval open_class_signature : Odoc_model.Lang.ClassSignature.t -> t -> t
Sourceval open_signature : Odoc_model.Lang.Signature.t -> t -> t
Sourceval open_type_substitution : Odoc_model.Lang.TypeDecl.t -> t -> t
Sourceval open_module_substitution : Odoc_model.Lang.ModuleSubstitution.t -> t -> t
Sourceval open_module_type_substitution : Odoc_model.Lang.ModuleTypeSubstitution.t -> t -> t
Sourceval open_page : Odoc_model.Lang.Page.t -> t -> t

Add a page content to the env.

Sourceval env_of_unit : Odoc_model.Lang.Compilation_unit.t -> linking:bool -> resolver -> t

Create a new env with a module initially opened.

Sourceval env_of_page : Odoc_model.Lang.Page.t -> resolver -> t

Create a new env for a page.

Sourceval env_for_reference : resolver -> t

Create a new env for a reference.

Sourceval env_for_testing : linking:bool -> t

Create a new env for testing purposes

Sourceval inherit_resolver : t -> t

Create an empty environment reusing the same resolver.

Sourceval len : int ref
Sourceval n : int ref
Sourceval verify_lookups : t -> LookupTypeSet.t -> bool