Generic programming library for regular datatypes.

Version on this page:
LTS Haskell 2.22:
Stackage Nightly 2015-05-19:
Latest on Hackage:
BSD3 licensed by Jose Pedro Magalhaes
Maintained by

Module documentation for

There are no documented modules for this package.

This package provides generic functionality for regular datatypes. Regular datatypes are recursive datatypes such as lists, binary trees, etc. This library cannot be used with mutually recursive datatypes or with nested datatypes. The multirec library [1] can deal with mutually recursive datatypes.

This library has been described in the paper:

  • A Lightweight Approach to Datatype-Generic Rewriting. Thomas van Noort, Alexey Rodriguez, Stefan Holdermans, Johan Jeuring, Bastiaan Heeren. ACM SIGPLAN Workshop on Generic Programming 2008.

More information about this library can be found at



version 0.3.4:
- Change template-haskell dependency to allow building with ghc-7.4.1.

version 0.3.3:
- Change template-haskell dependency to allow building with ghc-7.2.1.

version 0.3.2:
- Add missing S case to eq.

version 0.3.1:
- Fix a bug in the Template Haskell code (thanks to

version 0.3.0:
- Remove gdseq (moved to the regular-extras package due to the introduction
of the deepseq dependency).

version 0.2.4:
- Export Assoc(..) from Generics.Regular.Functions.Crush (thanks to Martijn
van Steenbergen).

version 0.2.3:
- Replaced the flag on the cabal package by an explicit test on the ghc
version. This makes it easier to build on ghc-6.12.

version 0.2.2:
- Update to build with ghc-6.12: require template-haskell-2.4.*, adapt
Generics.Regular.TH accordingly and use CPP to maintain compatibility with

version 0.2.1:
- Do not export generic equality by default to avoid clashes with Prelude
- Turn I and K into newtypes

version 0.2:
- Separated generic functions per modules
- Added generic unfold
- Added record selectors
- Improved generic show, added showsPrec
- Added generic read
- Added generic deep seq
- Added constructor names

version 0.1: initial release
comments powered byDisqus