package ppx_derive_at_runtime

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

Produces a generic fold over t, given a result type.

Binary tree types.

Parameters

module Acc : Base.T2

Signature

Polymorphic callbacks used in recursion over the GADT.

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

Folds over a type representation.

OCaml

Innovation. Community. Security.