Evaluation à la Carte: Non-Strict Evaluation via Compositional Data Types
Proceedings of the 23rd Nordic Workshop on Programming Theory, p. 38-40, 2011.
We describe how to perform monadic computations over recursive data structures with fine grained control over the evaluation strategy. This solves the issue that the definition of a recursive monadic function already determines the evaluation strategy due to the necessary sequencing of the monadic operations. We show that compositional data types already provide the structure needed in order to delay monadic computations at any point of the computation.
Categories: Recursion Schemes, Type Systems, Functional Programming
Tags: Monads, Tree Transformations, Evaluation Strategies, Haskell, Generic Programming