package odoc

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

This module allows to fold over odoc values. It is notably used to construct a search database of every relevant item. It appear to be very generic but in reality it is quite specialized to fold over searchable items, and not every kind of odoc value you could fold over.

type item =
  1. | CompilationUnit of Lang.Compilation_unit.t
  2. | TypeDecl of Lang.TypeDecl.t
  3. | Module of Lang.Module.t
  4. | Value of Lang.Value.t
  5. | Exception of Lang.Exception.t
  6. | ClassType of Lang.ClassType.t
  7. | Method of Lang.Method.t
  8. | Class of Lang.Class.t
  9. | Extension of Lang.Extension.t
  10. | ModuleType of Lang.ModuleType.t
  11. | Doc of Comment.docs_or_stop

The type of items you can fold over

Bellow are the folding functions. For items that may contain others, such as signature, it folds recursively on the sub-items. It does not recurse into internal items.

val unit : f:('a -> item -> 'a) -> 'a -> Lang.Compilation_unit.t -> 'a
val page : f:('a -> item -> 'a) -> 'a -> Lang.Page.t -> 'a
val signature : f:('a -> item -> 'a) -> 'a -> Lang.Signature.t -> 'a
val signature_item : f:('a -> item -> 'a) -> 'a -> Lang.Signature.item -> 'a
val docs : f:('a -> item -> 'a) -> 'a -> Comment.docs_or_stop -> 'a
val include_ : f:('a -> item -> 'a) -> 'a -> Lang.Include.t -> 'a
val class_type : f:('a -> item -> 'a) -> 'a -> Lang.ClassType.t -> 'a
val class_signature : f:('a -> item -> 'a) -> 'a -> Lang.ClassSignature.t -> 'a
val class_signature_item : f:('a -> item -> 'a) -> 'a -> Lang.ClassSignature.item -> 'a
val class_ : f:('a -> item -> 'a) -> 'a -> Lang.Class.t -> 'a
val exception_ : f:('a -> item -> 'a) -> 'a -> Lang.Exception.t -> 'a
val type_extension : f:('a -> item -> 'a) -> 'a -> Lang.Extension.t -> 'a
val value : f:('a -> item -> 'a) -> 'a -> Lang.Value.t -> 'a
val module_ : f:('a -> item -> 'a) -> 'a -> Lang.Module.t -> 'a
val type_decl : f:('a -> item -> 'a) -> 'a -> Lang.TypeDecl.t -> 'a
val module_type : f:('a -> item -> 'a) -> 'a -> Lang.ModuleType.t -> 'a
val simple_expansion : f:('a -> item -> 'a) -> 'a -> Lang.ModuleType.simple_expansion -> 'a
val module_type_expr : f:('a -> item -> 'a) -> 'a -> Lang.ModuleType.expr -> 'a
val functor_parameter : f:('a -> item -> 'a) -> 'a -> Lang.FunctorParameter.t -> 'a
OCaml

Innovation. Community. Security.