Module Odoc_odoc.Odoc_fileSource

Load and save .odoc and .odocl files.

Sourcetype content =
  1. | Page_content of Odoc_model.Lang.Page.t
  2. | Source_tree_content of Odoc_model.Lang.SourceTree.t
  3. | Unit_content of unit_content

Either a page or a module.

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_source_tree : Fs.File.t -> warnings:Odoc_model.Error.t list -> Odoc_model.Lang.SourceTree.t -> unit

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

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

Save a module.

Deserialization

Load an .odoc file.

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