Handling compilation handily
of Bernard Bot
Many functional languages are compiled with continuations. The seminal work by A. Appel showed how to use two key techniques: CPS and Closure Conversion. While very useful, these transformations give up type information and reduce readability. Using a metalanguage’s type system and a (monadic) abstraction over our syntax, we can try to remedy these problems. We will aim to guarantee the well-typedness of our intermediate representation, which is similar to the original AST of the source language, but has more type information and related structure constraints. Viewing compilation as an effectful computation, we try to apply the paradigm of effect handlers to language translation. The goal of this project is to gain insight into the usefulness of these new additions and compare them to a conventional implementation.
- Appel, Andrew W. Compiling with continuations. Cambridge University Press, 2007.
- Swierstra, Wouter. 2008. “Data Types à La Carte.” J. Funct. Program. 18 (4): 423–36. https://doi.org/10.1017/S0956796808006758.
- Kiselyov, Oleg, and Hiromi Ishii. 2015. “Freer Monads, More Extensible Effects.” In Proceedings of the 8th ACM SIGPLAN Symposium on Haskell, Haskell 2015, Vancouver, Bc, Canada, September 3-4, 2015, edited by Ben Lippmeier, 94–105. ACM. https://doi.org/10.1145/2804302.2804319.
Student: Bernard Bot
Supervisor(s): Eelco Visser, Casper Bach Poulsen