The emgm package
EMGM is a general-purpose library for generic programming with type classes.
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 library provides three main components:
Common - A common foundation for building generic functions and adding support for datatypes. This includes the collection of datatypes (e.g. sum, product, unit) and type classes (e.g. Generic, Rep), that are used throughout the library. This is what you need to define your own generic functions, to add generic support for your datatype, or to define ad-hoc cases.
Data - Support for using standard datatypes generically. Types such as [a], tuples, and Maybe are built into Haskell or come included in the standard libraries. EMGM provides full support for generic functions on these datatypes. The modules in this component are also useful as guides when adding generic support for your own datatypes.
Functions - A collection of useful generic functions. These work with a variety of datatypes and provide a wide range of operations. For example, there is crush, a generalization of the fold functions. It is one of the most useful functions, because it allows you to flexibly extract the elements of a polymorphic container.
For more information on the EMGM library, see the homepage: http://www.cs.uu.nl/wiki/GenericProgramming/EMGM
- No changelog available
|Versions||0.1, 0.2, 0.3, 0.3.1, 0.4|
|Dependencies||base (>=3.0 && <4.0), template-haskell (<2.3) or|
base (>=3.0 && <4.0), template-haskell (==2.3.*)
|Copyright||(c) 2008 Universiteit Utrecht|
|Author||Sean Leather, José Pedro Magalhães, Alexey Rodriguez, Andres Löh|
|Upload date||Fri Jan 30 13:22:38 UTC 2009|
|Downloads||362 total (29 in last 30 days)|
|th23||Define a CPP flag that enables conditional compilation for template-haskell package version 2.3 and newer.||Enabled|
|test||Enable the test configuration: Build the test executable, reduce build time.||Disabled|
|hpc||Enable program coverage on test executable.||Disabled|
|nolib||Don't build the library. This is useful for speeding up the modify-build-test loop. With "-ftest" (only), the build command will build both the library and the test executable. With "-ftest -fnolib", the build command builds only the test executable.||Disabled|
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
For package maintainers and hackage trustees