Abstract
In this paper we describe the structure of the Essential Haskell Compiler (EHC) and how we manage its complexity, despite its growth from essentials to a full Haskell compiler. Our approach splits both language and implementation into smaller, manageable steps, and uses specific tools to generate parts of the compiler from higher level descriptions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Hugs 98 (2003), http://www.haskell.org/hugs/
ASF+SDF (2005), http://www.cwi.nl/htbin/sen1/twiki/bin/view/SEN1/ASF+SDF
Eli: An Integrated Toolset for Compiler Construction (2005), http://eli-project.sourceforge.net/
The Catalog of Compiler Construction Tools (2006), http://catalog.compilertools.net/
The GENTLE Compiler Construction System (2007), http://gentle.compilertools.net/
The Twelf Project (2007), http://twelf.plparty.org/wiki
JastAdd (2008), http://jastadd.org/
Polyglot (2008), http://www.cs.cornell.edu/projects/polyglot/
Baars, A.: Attribute Grammar System (2004), http://www.cs.uu.nl/groups/ST/Center/AttributeGrammarSystem
Bird, R., de Moor, O.: The algebra of programming. Prentice Hall, Englewood Cliffs (1996)
Bird, R.S.: Using Circular Programs to Eliminate Multiple Traversals of Data. Acta Informatica 21, 239–250 (1984)
Boquist, U.: Code Optimisation Techniques for Lazy Functional Languages, PhD Thesis. Chalmers University of Technology (1999)
Boquist, U., Johnsson, T.: The GRIN Project: A Highly Optimising Back End For Lazy Functional Languages. In: Selected papers from the 8th International Workshop on Implementation of Functional Languages (1996)
Dijkstra, A.: EHC Web (2004), http://www.cs.uu.nl/groups/ST/Ehc/WebHome
Dijkstra, A.: Stepping through Haskell. PhD thesis, Utrecht University, Department of Information and Computing Sciences (2005)
Dijkstra, A., Swierstra, S.D.: Typing Haskell with an Attribute Grammar. In: Vene, V., Uustalu, T. (eds.) AFP 2004. LNCS, vol. 3622, pp. 1–72. Springer, Heidelberg (2005)
Dijkstra, A., Swierstra, S.D.: Ruler: Programming Type Rules. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 30–46. Springer, Heidelberg (2006)
Ekman, T., Hedin, G.: The JastAdd Extensible Java Compiler. In: OOPSLA, pp. 1–18 (2007)
Ekman, T., Hedin, G.: The JastAdd System - modular extensible compiler construction. Science of Computer Programming 69(1-3), 14–26 (2007)
Gray, R.W., Levi, S.P., Heuring, V.P., Sloane, A.M., Waite, W.M.: Eli: a complete, flexible compiler construction system. Communications of the ACM 35(2), 121–130 (1992)
Grosch, J., Emmelmann, H.: A Tool Box for Compiler Construction. In: Proceedings of the third international workshop on Compiler compilers (1991)
Grosch, J., Vollmer, J.: Compiler Compiler Laboratory (2007), http://www.cocolab.com/
Hedin, G., Magnusson, E.: JastAdd, an aspect-oriented compiler construction system. Science of Computer Programming 47(1), 37–58 (2003)
Jones, M.P.: Typing Haskell in Haskell. In: Haskell Workshop (1999)
Kastens, U.: Ordered Attribute Grammars. Acta Informatica 13, 229–256 (1980)
Knuth, D.E.: Semantics of context-free languages. Mathematical Systems Theory 2(2), 127–145 (1968)
Knuth, D.E.: Literate Programming. Journal of the ACM (42), 97–111 (1984)
Lämmel, R., Jones, S.P.: Scrap your boilerplate: a practical design pattern for generic programming. In: Types In Languages Design And Implementation, pp. 26–37 (2003)
Lattner, C.: The LLVM Compiler Infrastructure Project (2007), http://llvm.org/
Levin, M.Y., Pierce, B.C.: TinkerType: A Language for Playing with Formal Systems (1999), http://www.cis.upenn.edu/~milevin/tt.html
Marlow, S.: The Glasgow Haskell Compiler (2004), http://www.haskell.org/ghc/
Marlow, S., Jones, S.P.: The New GHC/Hugs Runtime System (1998), http://citeseer.ist.psu.edu/marlow98new.html
Meijer, E., Jeuring, J.: Merging monads and folds for functional programming. In: Jeuring, J., Meijer, E. (eds.) AFP 1995. LNCS, vol. 925. Springer, Heidelberg (1995)
Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An Extensible Compiler Framework for Java. In: Hedin, G. (ed.) CC 2003 and ETAPS 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)
Jones, S.P.: Compiling Haskell by program transformation: a report from the trenches. In: European Symposium On Programming, pp. 18–44 (1996)
Jones, S.P., Hall, C., Hammond, K., Partain, W., Wadler, P.: The Glasgow Haskell compiler: a technical overview. In: Proc. UK Joint Framework for Information Technology (JFIT) Technical Conference (1992)
Jones, S.P., Marlow, S.: Secrets of the Glasgow Haskell Compiler inliner. Journal of Functional Programming, 393–434 (2002)
Jones, S.P., Santos, A.: Compilation by Transformation in the Glasgow Haskell Compiler (1994), http://citeseer.ist.psu.edu/peytonjones94compilation.html
Jones, S.P., Santos, A.: A transformation-based optimiser for Haskell. Science of Computer Programming 32(1-3), 3–47 (1998)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
Saraiva, J.: Purely Functional Implementation of Attribute Grammars. PhD thesis, Utrecht University (1999)
Schrer, F.W.: The GENTLE Compiler Construction System. R. Oldenbourg Verlag (1997)
Sewell, P., Nardelli, F.Z., Owens, S., Peskine, G., et al.: Ott: effective tool support for the working semanticist. In: ICFP, pp. 1–12 (2007)
Doaitse Swierstra, S., Azero Alocer, P.R., Saraiava, J.: Designing and Implementing Combinator Languages. In: Swierstra, D., Henriques, P., Oliveira, J. (eds.) AFP 1998. LNCS, vol. 1608, pp. 150–206. Springer, Heidelberg (1999)
Visser, E.: A language for program transformation based on rewriting strategies. System description of Stratego 0.5. In: Middeldorp, A. (ed.) RTA 2001. LNCS, vol. 2051, pp. 357–361. Springer, Heidelberg (2001)
Visser, E.: Stratego Home Page (2005), http://www.program-transformation.org/Stratego/WebHome
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Dijkstra, A., Fokker, J., Swierstra, S.D. (2008). The Structure of the Essential Haskell Compiler, or Coping with Compiler Complexity. In: Chitil, O., Horváth, Z., Zsók, V. (eds) Implementation and Application of Functional Languages. IFL 2007. Lecture Notes in Computer Science, vol 5083. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-85373-2_4
Download citation
DOI: https://doi.org/10.1007/978-3-540-85373-2_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-85372-5
Online ISBN: 978-3-540-85373-2
eBook Packages: Computer ScienceComputer Science (R0)