package odig

  1. Overview
  2. Docs

Module Odig_support.Doc_cobjSource

Lookup package API documention compilation objects.

The compilation objects relevant for documentation are looked up according to the following rules:

  1. Packages denote which compilation units should appear in the docs by installing their cmi file.
  2. For each of these files odig looks, in the same directory, first for a corresponding cmti file then if missing for a cmt file, then if none of these exist the cmi file.
  3. For cmti or cmt files which have no corresponding cmi file odig collects them and deems them to be hidden (odoc will be called with the --hidden option).

Documentation compilation objects

Sourcetype kind =
  1. | Cmi
  2. | Cmti
  3. | Cmt

The type for kinds of documentation compilation object.

Sourcetype t

The type for documentation compilation objects.

Sourceval path : t -> B0_std.Fpath.t

path cobj is the path to cobj.

Sourceval kind : t -> kind

kind cobj is the kind of cobj.

Sourceval modname : t -> string

modname cobj is the module name of cobj (as determined from the filename).

Sourceval pkg : t -> Pkg.t

pkg cobj is the package of cobj.

Sourceval hidden : t -> bool

hidden cobj is true if odoc must compile cobj with the --hidden option.

Sourceval don't_list : t -> bool

don't_list cobj is true if cobj should not appear in module indexes.

Queries

Sourceval of_pkg : Pkg.t -> t list

of_pkg pkg are the compilation objects of pkg that are useful for documentation generation.

Sourceval by_modname : ?init:t list B0_std.String.Map.t -> t list -> t list B0_std.String.Map.t

by_modname ~init cobjs indexes cobjs by module name and adds them to init (defaults to String.Map.empty).