Skip to main content

Towards Modular Compilers for Effects

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 7193)

Abstract

Compilers are traditionally factorised into a number of separate phases, such as parsing, type checking, code generation, etc. However, there is another potential factorisation that has received comparatively little attention: the treatment of separate language features, such as mutable state, input/output, exceptions, concurrency and so forth. In this article we focus on the problem of modular compilation, in which the aim is to develop compilers for separate language features independently, which can then be combined as required. We summarise our progress to date, issues that have arisen, and further work.

Keywords

  • Modularity
  • Haskell
  • Compilation
  • Monads

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-642-32037-8_4
  • Chapter length: 16 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   54.99
Price excludes VAT (USA)
  • ISBN: 978-3-642-32037-8
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   72.00
Price excludes VAT (USA)

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Acerbi, M.: Personal Communication (May 2011)

    Google Scholar 

  2. Bahr, P., Hvitved, T.: Parametric Compositional Data Types. University of Copenhagen (June 2011)

    Google Scholar 

  3. Harrison, W.L.: Modular Compilers and Their Correctness Proofs. PhD thesis, University of Illinois at Urbana-Champaign (2001)

    Google Scholar 

  4. Huttel, H.: Transitions and Trees: An Introduction to Structured Operational Semantics. Cambridge University Press (2010)

    Google Scholar 

  5. Hutton, G.: Programming in Haskell. Cambridge University Press (2007)

    Google Scholar 

  6. Hutton, G., Wright, J.: Compiling Exceptions Correctly. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 211–227. Springer, Heidelberg (2004)

    CrossRef  Google Scholar 

  7. Jaskelioff, M.: Monatron: An Extensible Monad Transformer Library. In: Scholz, S.-B., Chitil, O. (eds.) IFL 2008. LNCS, vol. 5836, pp. 233–248. Springer, Heidelberg (2011)

    CrossRef  Google Scholar 

  8. Jaskelioff, M.: Lifting of Operations in Modular Monadic Semantics. PhD thesis, University of Nottingham (2009)

    Google Scholar 

  9. Liang, S., Hudak, P., Jones, M.: Monad Transformers and Modular Interpreters. In: Proceedings of the 22nd ACM Symposium on Principles of Programming Languages. ACM Press (1995)

    Google Scholar 

  10. Meijer, E., Fokkinga, M., Paterson, R.: Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 124–144. Springer, Heidelberg (1991)

    CrossRef  Google Scholar 

  11. Meijer, E., Hutton, G.: Bananas In Space: Extending Fold and Unfold To Exponential Types. In: Proceedings of the 7th SIGPLAN-SIGARCH-WG2.8 International Conference on Functional Programming and Computer Architecture. ACM Press, La Jolla (1995)

    Google Scholar 

  12. Moggi, E.: Notions of Computation and Monads. Information and Computation 93, 55–92 (1989)

    CrossRef  MathSciNet  Google Scholar 

  13. Mosses, P.D.: Modular structural operational semantics (2004)

    Google Scholar 

  14. Schmidt, D.A.: Denotational Semantics: A Methodology For Language Development. William C. Brown Publishers, Dubuque (1986)

    Google Scholar 

  15. Swierstra, W.: Data Types à la Carte. Journal of Functional Programming 18, 423–436 (2008)

    CrossRef  MathSciNet  MATH  Google Scholar 

  16. Wadler, P.: Comprehending Monads. In: Proc. ACM Conference on Lisp and Functional Programming (1990)

    Google Scholar 

  17. Wadler, P.: Monads for Functional Programming. In: Proceedings of the Marktoberdorf Summer School on Program Design Calculi. Springer, Heidelberg (1992)

    Google Scholar 

  18. Wadler, P.: The Expression Problem (1998), http://homepages.inf.ed.ac.uk/wadler/papers/expression/expression.txt

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Day, L.E., Hutton, G. (2012). Towards Modular Compilers for Effects. In: Peña, R., Page, R. (eds) Trends in Functional Programming. TFP 2011. Lecture Notes in Computer Science, vol 7193. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32037-8_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-32037-8_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-32036-1

  • Online ISBN: 978-3-642-32037-8

  • eBook Packages: Computer ScienceComputer Science (R0)