Module Odoc_odoc.Odoc_fileSource

Load and save .odoc and .odocl files.

Sourcetype content =
  1. | Page_content of Odoc_model.Lang.Page.t
  2. | Impl_content of Odoc_model.Lang.Implementation.t
  3. | Unit_content of Odoc_model.Lang.Compilation_unit.t
  4. | Asset_content of Odoc_model.Lang.Asset.t

Either a page or a module or something else.

Sourcetype t = {
  1. content : content;
  2. warnings : Odoc_model.Error.t list;
}

Serialization

Sourceval save_page : Fs.File.t -> warnings:Odoc_model.Error.t list -> Odoc_model.Lang.Page.t -> unit

Save a page. The page- prefix is added to the file name if missing.

Sourceval save_unit : Fs.File.t -> warnings:Odoc_model.Error.t list -> Odoc_model.Lang.Compilation_unit.t -> unit

Save a module.

Sourceval save_impl : Fs.File.t -> warnings:Odoc_model.Error.t list -> Odoc_model.Lang.Implementation.t -> unit

Save an implementation. The src- prefix is added to the file name if missing.

Deserialization

Load an .odoc file.

Only load the root. Faster than load, used for looking up imports.

Sourceval save_index : Fs.File.t -> Odoc_index.t -> unit

Load a .odoc-index file.

Sourceval save_sidebar : Fs.File.t -> Odoc_document.Sidebar.t -> unit

Load a .odoc-index file.

Sourceval save_asset : Fpath.t -> warnings:Odoc_model.Error.t list -> Odoc_model.Lang.Asset.t -> unit