Abstract
This thesis contains a description of an implementation of an extended subset of the programming language Haskell. At the same time it is an experiment in merging the description with the actual code of the implementation, thus guaranteeing some form of consistency. Similarly, we guarantee consistency between type rules and
... read more
their implementation by using our Ruler system. The thesis is also about making description and implementation understandable, so that it can be used as a means for education and (Haskell) programming language research. In this thesis we take a new and stepwise approach to both description and implementation, which starts with a simple version of Haskell and then, step by step, we extend this simple version with (amongst other things) mechanisms for the use of explicit (type) information when implicit mechanisms are inadequate.
The reason to set out on this journey lies in the observation that Haskell has become a complex language. Haskell includes many productivity increasing features, some of which are of a more experimental nature. Although also intended as a research platform, realistic compilers for Haskell have grown over the years and understanding and experimenting with those compilers is not easy. Experimentation on a smaller scale is usually based upon relatively simple and restricted implementations, often focusing only on a particular aspect of the language and/or its implementation.
A second reason is that experimenting with Haskell, or language design in general, usually expresses itself in a theoretical setting, with a focus on the proof of formal properties. Experimentation also takes place in a practical setting, but often it is not at all obvious how theory and practice of an experiment relate. We feel that a description of a Haskell implementation which focusses on a joint presentation of the implementation and its formal representation (by means of type rules), and their mutual consistency, helps to bridge the gap between theory and practice.
The complexities of Haskell and its interaction with experimental features cannot be avoided; even more, it is desirable, as Haskell plays an important role in programming language research. Some of those experimental features turn into useful language constructs, increasing the language complexity as a consequence. The complexity can be made more manageable by looking at features individually, while not loosing sight of the context with which such a feature has to coexist. This thesis aims at walking somewhere between this complexity and simplicity by describing features individually, as separate aspects of a more complex whole.
show less