package odoc

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Load and save .odoc and .odocl files.

type content =
  1. | Page_content of Odoc_model.Lang.Page.t
  2. | Unit_content of Odoc_model.Lang.Compilation_unit.t

Either a page or a module.

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

Serialization

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

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

Save a module.

Deserialization

val load : Fs.File.t -> (t, [> Or_error.msg ]) Or_error.result

Load an .odoc file.

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

OCaml

Innovation. Community. Security.