Generic Haskell project introduction
The goal of the Generic Haskell project is to develop:
- a generic programming language extension of Haskell;
- practical examples such as a database connection and XML tools;
- programming methods for the language extension.
Thus we will obtain a truly generic, type-safe, and practically
applicable extension of Haskell.
Generic Programming
Software development often consists of designing a datatype, to which
functionality is added. Some functionality is datatype specific, other
functionality is defined on almost all datatypes, and only depends on
the type structure of the datatype. Examples of generic (or polytypic)
functionality defined on almost all datatypes are storing a value in a
database, editing a value, comparing two values for equality,
pretty-printing a value, etc. A function that works on many datatypes
is called a polytypic function.
Since datatypes often change and new datatypes are introduced, we have
developed Polyp, an extension of the functional programming language
Haskell that supports defining polytypic functions. However, Polyp allows
the definition of polytypic functions on a limited set of datatypes,
which hinders the wide application of polytypic programming.
Recent work by Hinze shows how to overcome many of the current limitations
of Polyp by extending Haskell with a construct for defining type-indexed
functions with kind-indexed types. Generic Haskell will be developed based
on Hinze's ideas.
Project description
Here is the postcript file with the project proposal.
The goal of the Generic Haskell project is to develop:
- a generic programming language extension of Haskell. We will
write a language report, and a
prototype implementing the language
as described in the report. The first prototype has been released
in November 2001, and since then several new versions have been
released.
- practical examples such as a database connection. Practical
examples of generic programs have been given by Hinze, and Jansson
and Jeuring. We will implement some of these examples in the
prototype.
- programming methods for the language extension. It is
sometimes difficult to specify and write generic programs for
particular problems. We will develop methods and tools to support
the construction of generic programs.
For information contact info@generic-haskell.org