syntactic

Generic representation and manipulation of abstract syntax

https://github.com/emilaxelsson/syntactic

Latest on Hackage:3.8.4

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Emil Axelsson
Maintained by [email protected]

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):

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.