emgm: Extensible and Modular Generics for the Masses

[ bsd3, generics, library ] [ Propose Tags ]

EMGM is a general-purpose library for datatype-generic programming.

The design is based on the idea of modeling algebraic datatypes as sum-of-product structures. Many datatypes can be modeled this way, and because they all share a common structure, we can write generic functions that work on this structure.

The primary features of the library are:

NOTE: As of version 0.4, this library does not have Template Haskell for generating the representation. We are working on another library for a solution to this problem.

[Skip to Readme]
Versions 0.1, 0.2, 0.3, 0.3.1, 0.4
Dependencies base (>=3.0 && <5.0) [details]
License BSD-3-Clause
Copyright (c) 2008 - 2011 Universiteit Utrecht
Author Sean Leather, José Pedro Magalhães, Alexey Rodriguez, Andres Löh
Maintainer generics@haskell.org
Category Generics
Home page http://www.cs.uu.nl/wiki/GenericProgramming/EMGM
Source repo head: git clone git://github.com/spl/emgm.git
Uploaded by SeanLeather at Wed Sep 21 15:58:05 UTC 2011
Distributions NixOS:0.4
Downloads 2008 total (7 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for emgm-0.4

[back to package description]

Extensible and Modular Generics for the Masses

Extensible and Modular Generics for the Masses (EMGM) is a library for generic programming in Haskell.


The primary features of EMGM include:

  • Datatype-generic programming using sum-of-product views
  • Large collection of ready-to-use generic functions
  • Included support for standard datatypes: lists, Maybe, tuples
  • Easy to add support for new datatypes
  • Type classes make writing new functions straightforward in a structurally inductive style
  • Generic functions are extensible with ad-hoc cases for arbitrary datatypes
  • Good performance of generic functions

The features of this distribution include:

  • The API is thoroughly documented with Haddock
  • Fully tested with QuickCheck and HUnit
  • Program coverage ensures that all useful code has been touched by tests


You can find examples of using EMGM in the examples directory of the source distribution.

Bugs & Support

To report bugs, use the Google Code project page for EMGM.

For general concerns and questions, use the Generics mailing list.