compdata: Compositional Data Types

[ bsd3, generics, library ] [ Propose Tags ]

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 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 [faq] 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.6.1.1, 0.6.1.2, 0.6.1.3, 0.6.1.4, 0.7, 0.7.0.1, 0.7.0.2, 0.8, 0.8.0.1, 0.8.1.0, 0.8.1.1, 0.8.1.2, 0.8.1.3, 0.9, 0.10, 0.10.1, 0.11, 0.12
Dependencies base (==4.*), containers, criterion, deepseq, derive, mtl, QuickCheck (>=2), random, Stream, template-haskell, test-framework, test-framework-quickcheck2, th-expand-syns, transformers, uniplate [details]
License BSD-3-Clause
Author Patrick Bahr, Tom Hvitved
Maintainer paba@diku.dk
Category Generics
Uploaded by PatrickBahr at Sun Sep 18 12:50:15 UTC 2011
Distributions NixOS:0.12
Executables benchmark, test
Downloads 13705 total (537 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2016-12-27 [all 8 reports]

Modules

  • Data
    • Data.Comp
      • Data.Comp.Algebra
      • Data.Comp.Annotation
      • Data.Comp.Arbitrary
      • Data.Comp.Automata
        • Data.Comp.Automata.Product
      • Data.Comp.Decompose
      • Data.Comp.DeepSeq
      • Data.Comp.Derive
      • Data.Comp.Desugar
      • Data.Comp.Equality
      • Data.Comp.Generic
      • Data.Comp.Matching
      • Data.Comp.Multi
        • Data.Comp.Multi.Algebra
        • Data.Comp.Multi.Annotation
        • Data.Comp.Multi.Derive
        • Data.Comp.Multi.Desugar
        • Data.Comp.Multi.Equality
        • Data.Comp.Multi.Foldable
        • Data.Comp.Multi.Functor
        • Data.Comp.Multi.Generic
        • Data.Comp.Multi.Ops
        • Data.Comp.Multi.Show
        • Data.Comp.Multi.Sum
        • Data.Comp.Multi.Term
        • Data.Comp.Multi.Traversable
        • Data.Comp.Multi.Variables
      • Data.Comp.MultiParam
        • Data.Comp.MultiParam.Algebra
        • Data.Comp.MultiParam.Annotation
        • Data.Comp.MultiParam.Any
        • Data.Comp.MultiParam.Derive
        • Data.Comp.MultiParam.Desugar
        • Data.Comp.MultiParam.Equality
        • Data.Comp.MultiParam.FreshM
        • Data.Comp.MultiParam.HDifunctor
        • Data.Comp.MultiParam.HDitraversable
        • Data.Comp.MultiParam.Ops
        • Data.Comp.MultiParam.Ordering
        • Data.Comp.MultiParam.Show
        • Data.Comp.MultiParam.Sum
        • Data.Comp.MultiParam.Term
      • Data.Comp.Ops
      • Data.Comp.Ordering
      • Data.Comp.Param
        • Data.Comp.Param.Algebra
        • Data.Comp.Param.Annotation
        • Data.Comp.Param.Any
        • Data.Comp.Param.Derive
        • Data.Comp.Param.Desugar
        • Data.Comp.Param.Difunctor
        • Data.Comp.Param.Ditraversable
        • Data.Comp.Param.Equality
        • Data.Comp.Param.FreshM
        • Data.Comp.Param.Ops
        • Data.Comp.Param.Ordering
        • Data.Comp.Param.Show
        • Data.Comp.Param.Sum
        • Data.Comp.Param.Term
      • Data.Comp.Show
      • Data.Comp.Sum
      • Data.Comp.Term
      • Data.Comp.TermRewriting
      • Data.Comp.Unification
      • Data.Comp.Variables
      • Data.Comp.Zippable

Flags

NameDescriptionDefaultType
test

Build test executable.

DisabledAutomatic
benchmark

Build benchmark executable.

DisabledAutomatic

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

Downloads

Maintainer's Corner

For package maintainers and hackage trustees