An Implementation of the Haskell Language

Diomidis D. Spinellis · 1990

This report describes the design and implementation of HASKELL system. The areas implemented are the lexical analysis, parsing, intepretation of the lambda tree, and machine code generation. Because of the size, complexity and novelty of the language many of these areas present particular difficulty. A considarable amount of meta-programming was used in order to tackle the size of the project. Contents Introduction v 1 Lexical Analysis 1 1.1 Technical Overview 1 1.2 General Description 3 1.3 The Layout Rule 4 1.4 Alternative Design 5 1.5 Coding for Speed 6 1.5.1 Token Recognition 7 1.5.2 Character Copying 8 1.5.3 Memory Allocation 9 1.5.4 Symbol Table Updates 9 1.5.5 The Ultimate Combination 9 1.5.6 Performance 10 1.6 Testing 10 2 Parsing 11 2.1 Technical Overview 11 2.2 General Description 12 2.3 Handling the Grammar Ambiguities 13 2.3.1 Definable Operators and Function Applications 13 2.3.2 General 15 2.3.3 September Version 15 2.3.4 April Grammar changes 17 2.3.5 April Version 18 ...

Read the paper · More papers on PaperTik