Bridging the Gulf: A Common Intermediate Language for ML and Haskell

  • Simon Peyton Jones ,
  • John Launchbury ,
  • Mark Shields ,
  • Andrew Tolmach

ACM Symposium on Principles of Programming Languages (POPL'98) |

Published by Association for Computing Machinery, Inc.

Compilers for ML and Haskell use intermediate languages that incorporate deeply-embedded assumptions about order of evaluation and side effects. We propose an intermediate language into which one can compile both ML and Haskell, thereby facilitating the sharing of ideas and infrastructure, and supporting language developments that move each language in the direction of the other. Achieving this goal without compromising the ability to compile as good code as a more direct route turned out to be much more subtle than we expected. We address this challenge using monads and unpointed types, identify two alternative language designs, and explore the choices they embody.