Generic representation and manipulation of abstract syntax.
The library provides a generic representation of type-indexed abstract syntax trees (or indexed data types in general). It also permits the definition of open syntax trees based on the technique in Data Types à la Carte [1].
This package does not work on GHC version 8.2, but works on many earlier and later versions.
(Note that the difference between version 2.x and 3.0 is not that big. The bump to 3.0 was done because the modules changed namespace.)
For more information, see "A Generic Abstract Syntax Model for Embedded Languages" (ICFP 2012):
Paper: https://emilaxelsson.github.io/documents/axelsson2012generic.pdf
Literal source: https://emilaxelsson.github.io/documents/axelsson2012generic.lhs
Slides: https://emilaxelsson.github.io/documents/axelsson2012generic-slides.pdf
Example EDSLs can be found in the examples
folder.
1 W. Swierstra. Data Types à la Carte. Journal of Functional Programming, 18(4):423-436, 2008, http://dx.doi.org/10.1017/S0956796808006758.