Odoc_odoc.Odoc_file
Load and save .odoc
and .odocl
files.
type unit_content = Odoc_model.Lang.Compilation_unit.t
type content =
| Page_content of Odoc_model.Lang.Page.t
| Source_tree_content of Odoc_model.Lang.SourceTree.t
| Unit_content of unit_content
Either a page or a module.
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_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.
val save_unit :
Fs.File.t ->
warnings:Odoc_model.Error.t list ->
unit_content ->
unit
Save a module.
val load : Fs.File.t -> (t, [> Or_error.msg ]) Or_error.result
Load an .odoc
file.
val load_root :
Fs.File.t ->
(Odoc_model.Root.t, [> Or_error.msg ]) Or_error.result
Only load the root. Faster than load
, used for looking up imports.