Module Odoc_xref

Resolving

This is the part of DocOck handling the resolving of path and references.

type resolver
type lookup_result_found = {
root : Odoc_model.Root.t;
hidden : bool;
}
type lookup_result =
| Forward_reference
| Found of lookup_result_found
| Not_found
type msg = [
| `Msg of string
]
val build_resolver : ?⁠equal:(Odoc_model.Root.t -> Odoc_model.Root.t -> bool) -> ?⁠hash:(Odoc_model.Root.t -> int) -> (string -> lookup_result) -> (Odoc_model.Root.t -> (Odoc_model.Lang.Compilation_unit.tmsg) Result.result) -> (string -> Odoc_model.Root.t option) -> (Odoc_model.Root.t -> (Odoc_model.Lang.Page.tmsg) Result.result) -> resolver

Build a resolver. Optionally provide equality and hash on 'a.

val resolve : resolver -> Odoc_model.Lang.Compilation_unit.t -> (Odoc_model.Lang.Compilation_unit.t[> msg ]) Result.result
val resolve_page : resolver -> Odoc_model.Lang.Page.t -> (Odoc_model.Lang.Page.t[> msg ]) Result.result

Expansion

This is the part of DocOck in charge of performing substitutions, inlining of includes, etc.

type expander
val build_expander : ?⁠equal:(Odoc_model.Root.t -> Odoc_model.Root.t -> bool) -> ?⁠hash:(Odoc_model.Root.t -> int) -> (string -> lookup_result) -> (root:Odoc_model.Root.t -> Odoc_model.Root.t -> (Odoc_model.Lang.Compilation_unit.tmsg) Result.result) -> expander

Build an expander. Assumes that it is safe to use Hashtbl.hash and structural equality (=) on 'a.

val expand : expander -> Odoc_model.Lang.Compilation_unit.t -> (Odoc_model.Lang.Compilation_unit.t[> msg ]) Result.result

Misc.

OCaml's predefined types and exceptions.

val core_types : Odoc_model.Lang.TypeDecl.t list
val core_exceptions : Odoc_model.Lang.Exception.t list
module Lookup : sig ... end