Typing Haskell in Haskell
NOTICE: As of November 1, 2000, a more recent version of the materials here is available from http://www.cse.ogi.edu/~mpj/thih.
Last updated:September 27, 2000
Haskell benefits from a sophisticated type system, but implementors, programmers, and researchers suffer because it has no formal description. To remedy this shortcoming, we present a Haskell program that implements a Haskell typechecker, thus providing a mathematically rigorous specification in a notation that is familiar to Haskell users. We expect this program to fill a serious gap in current descriptions of Haskell, both as a starting point for discussions about existing features of the type system, and as a platform from which to explore new proposals.
The source code for the type checker is derived from exactly the same source as the code shown in the paper, but it also contains quite a lot of extra code for testing and printing. So, as long as I do my job properly, you can be sure that (a) what you see in the paper actually works, and that (b) the code and the paper are consistent with each other! The source code is available in two different formats:
Several people have asked me if I have a version of Typing Haskell in Haskell that works with multiple parameter classes. In fact, I have a couple. Here's the one that is closest to the September 1, 1999 release as a gzipped tar file: thih-multiparam.tar.gz.
Please note that further revisions to this paper and software are already planned or in progress.
Comments, suggestions, and bug reports are all welcome; please contact me at email@example.com.