package ppx_derive_at_runtime

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

Signature of a fold over a binary tree from Type_without_fold, above.

Binary tree types.

type (_, _) node
type (_, _) leaf
type (_, _) tree
type (_, _) acc

Accumulator type of the fold.

Polymorphic callbacks used in recursion over the GADT.

type 'whole leaf_callback = {
  1. on_leaf : 'part. ('whole, 'part) leaf -> ('whole, 'part) acc;
}
type 'whole node_callback = {
  1. on_node : 'left 'right. ('whole, 'left) acc -> ('whole, 'right) acc -> ('whole, ('left, 'right) node) acc;
}
val fold : ('whole, 'tree) tree -> leaf:'whole leaf_callback -> node:'whole node_callback -> ('whole, 'tree) acc

Folds over a type representation.

OCaml

Innovation. Community. Security.