PushNegF.hs [3K]

Pushing the negation down: the `final' implementation

PushNegFExt.hs [4K]

Pushing the negation down for extended tagless-final terms

FlatI.hs [2K]

FlatF.hs [4K]

Flattening of additions, the initial and the final implementations

PushNegFI.hs [4K]

The final-initial isomorphism, and its use for implementing arbitrary pattern-matching operations on tagless-final terms.

`Initial' and `Final' as isomorphic initial algebras

<http://www.comlab.ox.ac.uk/ralf.hinze/SSGIP10/Slides.pdf>

Ralf Hinze, in Part 7 of his Spring School course, has derived this `initial-final' isomorphism rigorously, generally and elegantly from the point of view of Category Theory. In the first-order case, both `initial' and `final' are the left and the right views to the same Initial Algebra. The `final' view is, in the first-order case, the ordinary Boehm-Berarducci encoding.

Modular, composable, typed optimizations

Tagless-final optimizations, algebraically and semantically

General, systematic approach that supports arbitrary transformations on tagless-final terms.