package odoc-driver

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

OCaml

Innovation. Community. Security.