Odoc_model.FoldSourceThis 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 = | CompilationUnit of Lang.Compilation_unit.t| TypeDecl of Lang.TypeDecl.t| Module of Lang.Module.t| Value of Lang.Value.t| Exception of Lang.Exception.t| ClassType of Lang.ClassType.t| Method of Lang.Method.t| Class of Lang.Class.t| Extension of Lang.Extension.t| ModuleType of Lang.ModuleType.t| Doc of Paths.Identifier.LabelParent.t * Comment.docs_or_stopThe type of items you can fold over
Below 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.
The LabelParent identifier is used to give an id to the doc entries.
val signature :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.Signature.t ->
'aval signature_item :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.Signature.item ->
'aval docs :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Comment.docs_or_stop ->
'aval include_ :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.Include.t ->
'aval class_type :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.ClassType.t ->
'aval class_signature :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.ClassSignature.t ->
'aval class_signature_item :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.ClassSignature.item ->
'aval class_ :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.Class.t ->
'aval module_ :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.Module.t ->
'aval module_type :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.ModuleType.t ->
'aval simple_expansion :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.ModuleType.simple_expansion ->
'aval module_type_expr :
f:('a -> item -> 'a) ->
Paths.Identifier.LabelParent.t ->
'a ->
Lang.ModuleType.expr ->
'a