Type family that converts pattern functors to convenient algebra types.
An error algebra over pattern functors.
Converts convenient algebras to algebras that are able to work with pattern functors.
Reduces a tree to a value according to the algebra, collecting potential errors. The errors are combined with the annotations in the tree at the positions at which the errors occurred.