Supporting Separate Compilation in a Defunctionalizing Compiler

Georgios Fourtounis, Nikolaos Papaspyrou · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · 2013

Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation. Our technique allows modules in a Haskell-like language to be separately defunctionalized and compiled, then linked together to generate an executable program. We provide a prototype implementation of our modular defunctionalization technique and we discuss the experiences of its application in a compiler from a large subset of Haskell to low-level C code, based on the intensional transformation.

Read the paper · More papers on PaperTik