Module Odoc_model.FoldSource

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.

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

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