jon.recoil.org

Module Url.PathSource

Sourcetype kind = [
  1. | `Module
  2. | `Page
  3. | `LeafPage
  4. | `ModuleType
  5. | `Parameter of int
  6. | `Class
  7. | `ClassType
  8. | `File
  9. | `SourcePage
]
Sourceval string_of_kind : Odoc_document.Url.Path.kind -> string
Sourceval pp_disambiguating_prefix : Stdlib.Format.formatter -> Odoc_document.Url.Path.kind -> unit

Print the "kind-" prefix used to disambiguate urls in "flat modes": e.g. latex labels and output files in --flat HTML and man output

Sourcetype t = {
  1. kind : Odoc_document.Url.Path.kind;
  2. parent : Odoc_document.Url.Path.t option;
  3. name : string;
}
Sourceval of_list : (Odoc_document.Url.Path.kind * string) list -> Odoc_document.Url.Path.t option
Sourceval split : is_dir:(Odoc_document.Url.Path.kind -> [ `Always | `Never | `IfNotLast ]) -> (Odoc_document.Url.Path.kind * string) list -> (Odoc_document.Url.Path.kind * string) list * (Odoc_document.Url.Path.kind * string) list

split is_dir path splits the list path into a directory and filename, based on the is_dir function. The function is_dir should return whether or not the path element kind should be a directory or not. If the function is_dir returns `IfNotLast then the element will be a directory only if it is not the last element in the path. The return value is a tuple of directory-type elements and filename-type elements. If the is_dir function can return `Always, the caller must be prepared to handle the case where the filename part is empty.

is_prefix p1 p2 tells whether p1 is a prefix of p2. It considers index pages as their parent: dir/page-index is a prefix of dir/foo/module-bar.