In this paper we describe the architecture of the Utrecht Haskell Compiler (UHC). UHC is a new Haskell compiler, that supports most (but not all) Haskell 98 features, plus some experimental extensions. It targets multiple backends, including a bytecode interpreter backend and a whole-program analysis backend, both via C. The implementation is rigorously organized as stepwise transformations through some explicit intermediate languages. The tree walks of all transformations are expressed as an algebra, with the aid of an Attribute Grammar based preprocessor. The compiler is just one materialization of a framework that supports experimentation with language variants, thanks to an aspect-oriented internal organization. Categories and Subject Descriptors D.3.4 [Programming languages]: Compilers; Preprocessors; F.3.2 [Logics and meanings of programs]: Program analysis General Terms Languages, Design Keywords Haskell, compiler architecture, attribute grammar, aspect orientation
Atze Dijkstra, Jeroen Fokker, S. Doaitse Swierstra