The compdata package

[Tags:benchmark, bsd3, library, test]

Based on Wouter Swierstra's Functional Pearl Data types à la carte (Journal of Functional Programming, 18(4):423-436, 2008,, this package provides a framework for defining recursive data types in a compositional manner. The fundamental idea of compositional data types (Workshop on Generic Programming, 83-94, 2011, is to separate the signature of a data type from the fixed point construction that produces its recursive structure. By allowing to compose and decompose signatures, compositional data types enable to combine data types in a flexible way. The key point of Wouter Swierstra's original work is to define functions on compositional data types in a compositional manner as well by leveraging Haskell's type class machinery.

Building on that foundation, this library provides additional extensions and (run-time) optimisations which make compositional data types usable for practical implementations. In particular, it provides an excellent framework for manipulating and analysing abstract syntax trees in a type-safe manner. Thus, it is perfectly suited for programming language implementations, especially, in an environment consisting of a family of tightly interwoven domain-specific languages.

In concrete terms, this package provides the following features:

Examples of using (generalised) (parametric) compositional data types are bundled with the package in the libray examples.


Versions 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.5, 0.5.1, 0.5.2, 0.5.3, 0.6, 0.6.1,,,,, 0.7,,, 0.8,,,,,, 0.9, 0.10, 0.10.1
Dependencies base (==4.*), containers, criterion, deepseq, derive, mtl, QuickCheck (>=2), random, template-haskell, th-expand-syns, transformers, uniplate [details]
License BSD3
Author Patrick Bahr, Tom Hvitved
Stability Unknown
Category Generics
Uploaded Tue Nov 29 10:50:55 UTC 2011 by PatrickBahr
Distributions LTSHaskell:0.10.1, NixOS:0.10.1, Tumbleweed:0.10.1
Downloads 5681 total (53 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




benchmarkBuild benchmark executable.DisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees