Module Odig_support.Doc_cobj

module Doc_cobj: sig .. end

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

type kind = 
| Cmi
| Cmti
| Cmt

The type for kinds of documentation compilation object.

type t 

The type for documentation compilation objects.

val path : t -> B0_std.Fpath.t

path cobj is the path to cobj.

val kind : t -> kind

kind cobj is the kind of cobj.

val modname : t -> string

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

val pkg : t -> Odig_support.Pkg.t

pkg cobj is the package of cobj.

val hidden : t -> bool

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

val don't_list : t -> bool

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


val of_pkg : Odig_support.Pkg.t -> t list

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

val 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).