Skip to main content

Compilation by Transformation in the Glasgow Haskell Compiler

  • Conference paper

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

Abstract

In this paper we describe the full set of local program transformations implemented in the Glasgow Haskell Compiler. The transformations are presented as source to source transformations in a simple functional language. The idea is that by composing these simple and small high level transformations one can achieve most of the benefits of more complicated and specialised transformations, many of which are often implemented as code generation optimisations.

Sponsored by the Brazilian agency CAPES under contract 2323/91-5.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Appel. Compiling with Continuations. Cambridge University Press, 1992.

    Google Scholar 

  2. A. Appel and T. Jim. Continuation-passing, closure-passing style. In ACM Conference on Principles of Programming Languages, pages 293302, January 1989.

    Google Scholar 

  3. W. N. Chin. Automatic Methods for Program Transformation. PhD thesis, Imperial College, London, March 1990.

    Google Scholar 

  4. A. Gill, J. Launchbury, and S. Peyton Jones. A short cut to deforestation. In Functional Programming Languages and Computer Architecture,pages 223–232, Copenhagen, June 1993. ACM Press.

    Google Scholar 

  5. R. J. M. Hughes. The Design and Implementation of Programming Languages. PhD thesis, Programming Research Group, Oxford University, July 1983.

    Google Scholar 

  6. T. Johnsson. Lambda lifting: Transforming programs to recursive equations. In Functional Programming Languages and Computer Architecture,number 201 in LNCS, pages 190–203, Nancy, September 1985. Springer-Verlag.

    Google Scholar 

  7. R. Kelsey and P. Hudak. Realistic compilation by program transformation. In ACM Conference on Principles of Programming Languages, pages 281292, January 1989.

    Google Scholar 

  8. R. A. Kelsey. Compilation by Program Transformation. PhD thesis, Yale University, Department of Computer Science, May 1989. YALEU/DCS/RR-702.

    Google Scholar 

  9. D. A. Kranz. ORBIT - an optimising compiler for Scheme. PhD thesis, Yale University, Department of Computer Science, May 1988.

    Google Scholar 

  10. J. Launchbury and P. M. Sansom, editors. Functional Programming, Glasgow 1992, Ayr, Scotland, 1992. Springer Verlag, Workshops in Computing.

    Google Scholar 

  11. S. Marlow and P. Wadler. Deforestation for higher-order functions. In Launchbury and Sansom [10], pages 154–165.

    Google Scholar 

  12. B. Matthews. MERILL: An equational reasoning system in Standard ML. In 5th International Conference on Rewriting Techniques and Applications, number 690 in LNCS, pages 414–445. Springer-Verlag, 1993.

    Google Scholar 

  13. B. Matthews. Analysing a set of transformation rules using completion. 1994.

    Google Scholar 

  14. W. Partain. The nofib benchmarking suite. In Launchbury and Sansom [10].

    Google Scholar 

  15. S. Peyton Jones, C. Hall, K. Hammond, W. Partain, and P. Wadler. The Glasgow Haskell compiler: a technical overview. In UK Joint Framework for Information Technology (JFIT) Technical Conference, Keele, March 1993.

    Google Scholar 

  16. S. Peyton Jones and J. Launchbury. Unboxed values as first class citizens. In Functional Programming Languages and Computer Architecture, pages 636–666, September 1991.

    Google Scholar 

  17. S. Peyton Jones and D. Lester. A modular fully-lazy lambda lifter in Haskell. Software–Practice and Experience, 21 (5): 479–506, May 1991.

    Article  Google Scholar 

  18. S. Peyton Jones and W. Partain. On the effectiveness of a simple strictness analyser. In Functional Programming, Glasgow 1993,Ayr, Scotland, 1993. Springer Verlag, Workshops in Computing.

    Google Scholar 

  19. P. Wadler. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73: 231–248, 1990.

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag London

About this paper

Cite this paper

Jones, S.P., Santos, A. (1995). Compilation by Transformation in the Glasgow Haskell Compiler. In: Hammond, K., Turner, D.N., Sansom, P.M. (eds) Functional Programming, Glasgow 1994. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3573-9_13

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3573-9_13

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19914-4

  • Online ISBN: 978-1-4471-3573-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics