package odoc

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type kind = [
  1. | `Module
  2. | `Page
  3. | `LeafPage
  4. | `ModuleType
  5. | `Parameter of int
  6. | `Class
  7. | `ClassType
  8. | `File
  9. | `SourcePage
]
val pp_kind : Format.formatter -> kind -> unit
val string_of_kind : kind -> string
type t = {
  1. kind : kind;
  2. parent : t option;
  3. name : string;
}
val from_identifier : [< any_pv ] Odoc_model.Paths.Identifier.id -> t
val to_list : t -> (kind * string) list
val of_list : (kind * string) list -> t option
val split : is_dir:(kind -> [ `Always | `Never | `IfNotLast ]) -> (kind * string) list -> (kind * string) list * (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.

OCaml

Innovation. Community. Security.