Abstract
Abstract.
Nested datatypes generalise regular datatypes in much the same way that context-free languages generalise regular ones. Although the categorical semantics of nested types turns out to be similar to the regular case, the fold functions are more limited because they can only describe natural transformations. Practical considerations therefore dictate the introduction of a generalised fold function in which this limitation can be overcome. In the paper we show how to construct generalised folds systematically for each nested datatype, and show that they possess a uniqueness property analogous to that of ordinary folds. As a consequence, generalised folds satisfy fusion properties similar to those developed for regular datatypes. Such properties form the core of an effective calculational theory of inductive datatypes.
Recommendations
Disciplined, efficient, generalised folds for nested datatypes
Abstract.Nested (or non-uniform, or non-regular) datatypes have recursive definitions in which the type parameter changes. Their folds are restricted in power due to type constraints. Bird and Paterson introduced generalised folds for extra power, but at ...
Nested Datatypes with Generalized Mendler Iteration: Map Fusion and the Example of the Representation of Untyped Lambda Calculus with Explicit Flattening
MPC '08: Proceedings of the 9th international conference on Mathematics of Program ConstructionNested datatypes are families of datatypes that are indexed over all types such that the constructors may relate different family members. Moreover, the argument types of the constructors refer to indices given by expressions where the family name may ...
(Co-) iteration for higher-order nested datatypes
TYPES'02: Proceedings of the 2002 international conference on Types for proofs and programsThe problem of defining iteration for higher-order nested datatypes of arbitrary (finite)rank is solved within the framework of System Fω of higher-order parametric polymorphism. The proposed solution heavily relies on a general notion of monotonicity ...
Comments