jon.recoil.org

Module Odoc_xref2.Env

type lookup_unit_result =
  1. | Forward_reference
  2. | Found of Odoc_model.Lang.Compilation_unit.t
type path_query = [
  1. | `Path of Odoc_model.Paths.Reference.Hierarchy.t
  2. | `Name of string
]
type lookup_error = [
  1. | `Not_found
]
type lookup_type =
  1. | Module of Odoc_model.Paths.Identifier.Path.Module.t
  2. | ModuleType of Odoc_model.Paths.Identifier.ModuleType.t
  3. | RootModule of Odoc_model.Names.ModuleName.t * [ `Forward | `Resolved of Stdlib.Digest.t ] option
  4. | ModuleByName of string * Odoc_model.Paths.Identifier.Path.Module.t
  5. | FragmentRoot of int
val pp_lookup_type_list : Stdlib.Format.formatter -> Odoc_xref2.Env.lookup_type list -> unit
type t
val is_linking : Odoc_xref2.Env.t -> bool
val with_recorded_lookups : Odoc_xref2.Env.t -> (Odoc_xref2.Env.t -> 'a) -> Odoc_xref2.Env.LookupTypeSet.t * 'a
val has_resolver : Odoc_xref2.Env.t -> bool
val id : Odoc_xref2.Env.t -> int
val empty : Odoc_xref2.Env.t
val lookup_fragment_root : Odoc_xref2.Env.t -> (int * Odoc_xref2.Component.Signature.t) option
val lookup_impl : string -> Odoc_xref2.Env.t -> Odoc_model.Lang.Implementation.t option
type 'a scope constraint 'a = [< Odoc_xref2.Component.Element.any ]

Target of a lookup

type 'a maybe_ambiguous = ('a, [ `Ambiguous of 'a * 'a list | `Not_found ]) Stdlib.result
val lookup_by_name : 'a Odoc_xref2.Env.scope -> string -> Odoc_xref2.Env.t -> 'a Odoc_xref2.Env.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.

Add a page content to the env.

Create a new env with a module initially opened.

Create a new env for a page.

Create a new env for an implementation.

val env_for_reference : Odoc_xref2.Env.resolver -> Odoc_xref2.Env.t

Create a new env for a reference.

val env_for_testing : linking:bool -> Odoc_xref2.Env.t

Create a new env for testing purposes

val inherit_resolver : Odoc_xref2.Env.t -> Odoc_xref2.Env.t

Create an empty environment reusing the same resolver.

val len : int Stdlib.ref
val n : int Stdlib.ref
val should_suppress_warnings : Odoc_xref2.Env.t -> string option -> bool
val set_warnings_tags : Odoc_xref2.Env.t -> string list -> Odoc_xref2.Env.t
val verify_lookups : Odoc_xref2.Env.t -> Odoc_xref2.Env.LookupTypeSet.t -> bool