Towards Modular Compilers for Effects

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7193)


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.


Modularity Haskell Compilation Monads 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Acerbi, M.: Personal Communication (May 2011)Google Scholar
  2. 2.
    Bahr, P., Hvitved, T.: Parametric Compositional Data Types. University of Copenhagen (June 2011)Google Scholar
  3. 3.
    Harrison, W.L.: Modular Compilers and Their Correctness Proofs. PhD thesis, University of Illinois at Urbana-Champaign (2001)Google Scholar
  4. 4.
    Huttel, H.: Transitions and Trees: An Introduction to Structured Operational Semantics. Cambridge University Press (2010)Google Scholar
  5. 5.
    Hutton, G.: Programming in Haskell. Cambridge University Press (2007)Google Scholar
  6. 6.
    Hutton, G., Wright, J.: Compiling Exceptions Correctly. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 211–227. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 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)CrossRefGoogle Scholar
  8. 8.
    Jaskelioff, M.: Lifting of Operations in Modular Monadic Semantics. PhD thesis, University of Nottingham (2009)Google Scholar
  9. 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. 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)CrossRefGoogle Scholar
  11. 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. 12.
    Moggi, E.: Notions of Computation and Monads. Information and Computation 93, 55–92 (1989)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Mosses, P.D.: Modular structural operational semantics (2004)Google Scholar
  14. 14.
    Schmidt, D.A.: Denotational Semantics: A Methodology For Language Development. William C. Brown Publishers, Dubuque (1986)Google Scholar
  15. 15.
    Swierstra, W.: Data Types à la Carte. Journal of Functional Programming 18, 423–436 (2008)MathSciNetzbMATHCrossRefGoogle Scholar
  16. 16.
    Wadler, P.: Comprehending Monads. In: Proc. ACM Conference on Lisp and Functional Programming (1990)Google Scholar
  17. 17.
    Wadler, P.: Monads for Functional Programming. In: Proceedings of the Marktoberdorf Summer School on Program Design Calculi. Springer, Heidelberg (1992)Google Scholar
  18. 18.

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  1. 1.Functional Programming Laboratory, School of Computer ScienceUniversity of NottinghamUK

Personalised recommendations