package odoc-driver

  1. Overview
  2. Docs

Module Odoc_driver_lib.Odoc_unitSource

Sourcemodule Pkg_args : sig ... end
Sourcetype sidebar = {
  1. output_file : Fpath.t;
  2. json : bool;
  3. pkg_dir : Fpath.t;
}
Sourcetype index = {
  1. roots : Fpath.t list;
  2. output_file : Fpath.t;
  3. json : bool;
  4. search_dir : Fpath.t;
  5. sidebar : sidebar option;
}
Sourcetype 'a t = {
  1. parent_id : Odoc.Id.t;
  2. input_file : Fpath.t;
  3. input_copy : Fpath.t option;
  4. output_dir : Fpath.t;
  5. odoc_file : Fpath.t;
  6. odocl_file : Fpath.t;
  7. pkg_args : Pkg_args.t;
  8. pkgname : string option;
  9. index : index option;
  10. enable_warnings : bool;
  11. to_output : bool;
  12. kind : 'a;
}
Sourcetype intf_extra = {
  1. hidden : bool;
  2. hash : string;
  3. deps : (string * Digest.t) list;
}
Sourceand intf = [
  1. | `Intf of intf_extra
]
Sourcetype impl_extra = {
  1. src_id : Odoc.Id.t;
  2. src_path : Fpath.t;
}
Sourcetype impl = [
  1. | `Impl of impl_extra
]
Sourcetype mld = [
  1. | `Mld
]
Sourcetype md = [
  1. | `Md
]
Sourcetype asset = [
  1. | `Asset
]
Sourcetype any = [ impl | intf | mld | asset | md ] t
Sourceval pp : any Fmt.t
Sourceval pkg_dir : Packages.t -> Fpath.t
Sourceval doc_dir : Packages.t -> Fpath.t
Sourceval src_dir : Packages.t -> Fpath.t
Sourceval src_lib_dir : Packages.t -> Packages.libty -> Fpath.t
Sourcetype dirs = {
  1. odoc_dir : Fpath.t;
  2. odocl_dir : Fpath.t;
  3. index_dir : Fpath.t;
  4. mld_dir : Fpath.t;
}
Sourceval fix_virtual : precompiled_units:intf t list Util.StringMap.t -> units:intf t list Util.StringMap.t -> intf t list Util.StringMap.t

fix_virtual ~precompiled_units ~units replaces the input file in units representing implementations of virtual libraries. Implementation units have a cmt but no cmti, even though the interface is actually constrained by a mli. The cmi file for the implementation is actually taken from the virtual library, so this function replaces the cmt used for the interface rendering of the implemenetation library units with the cmti taken from the virtual library. units should contain all the units that might be changed by this function. precompiled_units should be empty if this is being called before any compilation has taken place - ie. in monorepo or opam mode. In voodoo mode if the virtual library is in a different package it will have already been compiled. and thus should not be changed. The types of the inputs and outputs are hashtbls of units, where the hashtable key is the interface hash.