multirec: Generic programming with systems of recursive datatypes
Many generic programs require information about the recursive positions of a datatype. Examples include the generic fold, generic rewriting or the Zipper data structure. Several generic programming systems allow to write such functions by viewing datatypes as fixed points of a pattern functor. Traditionally, this view has been limited to so-called regular datatypes such as lists and binary trees. In particular, systems of mutually recursive datatypes have been excluded.
With the multirec library, we provide a mechanism to talk about fixed points of systems of datatypes that may be mutually recursive. On top of this representations, generic functions such as the fold or the Zipper can then be defined.
We expect that the library will be especially interesting for compiler writers, because ASTs are typically systems of mutually recursive datatypes, and with multirec it becomes easy to write generic functions on ASTs.
The library is based on ideas described in the paper:
Alexey Rodriguez, Stefan Holdermans, Andres Löh, Johan Jeuring. Generic programming with fixed points for mutually recursive datatypes. Technical Report, Universiteit Utrecht (http://www.cs.uu.nl/research/techreps/repo/CS-2008/2008-019.pdf).
Modules
[Index]
- Generics
- Generics.MultiRec
- Generics.MultiRec.Base
- Generics.MultiRec.Compos
- Generics.MultiRec.ConNames
- Generics.MultiRec.Constructor
- Generics.MultiRec.Eq
- Generics.MultiRec.Fold
- Generics.MultiRec.FoldAlg
- Generics.MultiRec.FoldAlgK
- Generics.MultiRec.FoldK
- Generics.MultiRec.HFix
- Generics.MultiRec.HFunctor
- Generics.MultiRec.Show
- Generics.MultiRec.TH
- Generics.MultiRec
Downloads
- multirec-0.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.5, 0.5.1, 0.6, 0.7, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.7.9 |
---|---|
Dependencies | base (>=3.0 && <4), template-haskell (>=2.2 && <2.4) [details] |
Tested with | ghc ==6.8.3, ghc ==6.10.1 |
License | BSD-3-Clause |
Author | Alexey Rodriguez, Stefan Holdermans, Andres Löh, Johan Jeuring |
Maintainer | generics@haskell.org |
Category | Generics |
Home page | http://www.cs.uu.nl/wiki/GenericProgramming/Multirec |
Uploaded | by AndresLoeh at 2009-01-13T15:01:03Z |
Distributions | |
Reverse Dependencies | 8 direct, 1 indirect [details] |
Downloads | 14104 total (71 in the last 30 days) |
Rating | 2.25 (votes: 2) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |