Odoc_model.FoldThis 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 Comment.docs_or_stopThe 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 -> 'aval page : f:('a -> item -> 'a) -> 'a -> Lang.Page.t -> 'aval signature : f:('a -> item -> 'a) -> 'a -> Lang.Signature.t -> 'aval signature_item : f:('a -> item -> 'a) -> 'a -> Lang.Signature.item -> 'aval docs : f:('a -> item -> 'a) -> 'a -> Comment.docs_or_stop -> 'aval include_ : f:('a -> item -> 'a) -> 'a -> Lang.Include.t -> 'aval class_type : f:('a -> item -> 'a) -> 'a -> Lang.ClassType.t -> 'aval class_signature : f:('a -> item -> 'a) -> 'a -> Lang.ClassSignature.t -> 'aval class_signature_item :
f:('a -> item -> 'a) ->
'a ->
Lang.ClassSignature.item ->
'aval class_ : f:('a -> item -> 'a) -> 'a -> Lang.Class.t -> 'aval exception_ : f:('a -> item -> 'a) -> 'a -> Lang.Exception.t -> 'aval type_extension : f:('a -> item -> 'a) -> 'a -> Lang.Extension.t -> 'aval value : f:('a -> item -> 'a) -> 'a -> Lang.Value.t -> 'aval module_ : f:('a -> item -> 'a) -> 'a -> Lang.Module.t -> 'aval type_decl : f:('a -> item -> 'a) -> 'a -> Lang.TypeDecl.t -> 'aval module_type : f:('a -> item -> 'a) -> 'a -> Lang.ModuleType.t -> 'aval simple_expansion :
f:('a -> item -> 'a) ->
'a ->
Lang.ModuleType.simple_expansion ->
'aval module_type_expr : f:('a -> item -> 'a) -> 'a -> Lang.ModuleType.expr -> 'aval functor_parameter :
f:('a -> item -> 'a) ->
'a ->
Lang.FunctorParameter.t ->
'a