package odoc

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
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 resolver = {
  1. open_units : string list;
  2. lookup_unit : path_query -> (lookup_unit_result, lookup_error) Odoc_utils.result;
  3. lookup_page : path_query -> (Odoc_model.Lang.Page.t, lookup_error) Odoc_utils.result;
  4. lookup_asset : path_query -> (Odoc_model.Lang.Asset.t, lookup_error) Odoc_utils.result;
  5. lookup_impl : string -> Odoc_model.Lang.Implementation.t option;
}
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 Digest.t ] option
  4. | ModuleByName of string * Odoc_model.Paths.Identifier.Path.Module.t
  5. | FragmentRoot of int
module LookupTypeSet : Set.S with type elt = lookup_type
val pp_lookup_type_list : Format.formatter -> lookup_type list -> unit
type t
val is_linking : t -> bool
val with_recorded_lookups : t -> (t -> 'a) -> LookupTypeSet.t * 'a
val set_resolver : t -> resolver -> t
val has_resolver : t -> bool
val id : t -> int
val empty : t
val add_fragment_root : Component.Signature.t -> t -> t
val add_docs : Odoc_model.Comment.docs -> t -> t
val add_comment : Odoc_model.Comment.docs_or_stop -> t -> t
val add_module_functor_args : Component.Module.t -> Odoc_model.Paths.Identifier.Path.Module.t -> t -> t
val add_module_type_functor_args : Component.ModuleType.t -> Odoc_model.Paths.Identifier.ModuleType.t -> t -> t
val lookup_fragment_root : t -> (int * Component.Signature.t) option
val lookup_page_by_name : string -> t -> (Odoc_model.Lang.Page.t, lookup_error) Odoc_utils.result
val lookup_asset_by_name : string -> t -> (Odoc_model.Lang.Asset.t, lookup_error) Odoc_utils.result
val lookup_impl : string -> t -> Odoc_model.Lang.Implementation.t option
val lookup_root_module : Odoc_model.Names.ModuleName.t -> t -> root option
type 'a scope constraint 'a = [< Component.Element.any ]

Target of a lookup

type 'a maybe_ambiguous = ('a, [ `Ambiguous of 'a * 'a list | `Not_found ]) Odoc_utils.Result.result
val 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.

val lookup_by_id : 'a scope -> [< Odoc_model.Paths.Identifier.t_pv ] Odoc_model.Paths.Identifier.id -> t -> 'a option

Like lookup_by_name but use an identifier as key.

val s_fragment_type_parent : Component.Element.fragment_type_parent scope
val add_functor_parameter : Odoc_model.Lang.FunctorParameter.t -> t -> t
val open_class_signature : Odoc_model.Lang.ClassSignature.t -> t -> t
val open_signature : Odoc_model.Lang.Signature.t -> t -> t
val open_type_substitution : Odoc_model.Lang.TypeDecl.t -> t -> t
val open_module_substitution : Odoc_model.Lang.ModuleSubstitution.t -> t -> t
val open_module_type_substitution : Odoc_model.Lang.ModuleTypeSubstitution.t -> t -> t
val open_page : Odoc_model.Lang.Page.t -> t -> t

Add a page content to the env.

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

Create a new env with a module initially opened.

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

Create a new env for a page.

Create a new env for an implementation.

val env_for_reference : resolver -> t

Create a new env for a reference.

val env_for_testing : linking:bool -> t

Create a new env for testing purposes

val inherit_resolver : t -> t

Create an empty environment reusing the same resolver.

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

Innovation. Community. Security.