package doc-ock

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Processing OCaml's compilation units

type 'a result =
  1. | Ok of 'a DocOckTypes.Unit.t
  2. | Not_an_interface
  3. | Wrong_version
  4. | Corrupted
  5. | Not_a_typedtree
  6. | Not_an_implementation
val read_cmti : (string -> Stdlib.Digest.t -> 'a) -> string -> 'a result
val read_cmt : (string -> Stdlib.Digest.t -> 'a) -> string -> 'a result
val read_cmi : (string -> Stdlib.Digest.t -> 'a) -> string -> 'a result

Resolving

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

type 'a resolver
type 'a lookup_result =
  1. | Forward_reference
  2. | Found of {
    1. root : 'a;
    2. hidden : bool;
    }
  3. | Not_found
val build_resolver : ?equal:('a -> 'a -> bool) -> ?hash:('a -> int) -> (string -> 'a lookup_result) -> ('a -> 'a DocOckTypes.Unit.t) -> (string -> 'a option) -> ('a -> 'a DocOckTypes.Page.t) -> 'a resolver

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

val resolve : 'a resolver -> 'a DocOckTypes.Unit.t -> 'a DocOckTypes.Unit.t
val resolve_page : 'a resolver -> 'a DocOckTypes.Page.t -> 'a DocOckTypes.Page.t

Expansion

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

type 'a expander
val build_expander : ?equal:('a -> 'a -> bool) -> ?hash:('a -> int) -> (string -> 'a lookup_result) -> (root:'a -> 'a -> 'a DocOckTypes.Unit.t) -> 'a expander

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

val expand : 'a expander -> 'a DocOckTypes.Unit.t -> 'a DocOckTypes.Unit.t

Misc.

OCaml's predefined types and exceptions.

val core_types : 'a DocOckTypes.TypeDecl.t list
val core_exceptions : 'a DocOckTypes.Exception.t list
OCaml

Innovation. Community. Security.