Implementing First-Class Polymorphic Delimited Continuations by a Type-Directed Selective CPS-Transform
We describe the implementation of first-class polymorphic delimited continuations in the programming language Scala. We use Scala's pluggable typing architecture to implement a simple type and effect system, which discriminates expressions with control effects from those without and accurately tracks answer type modification incurred by control effects. To tackle the problem of implementing first-class continuations under the adverse conditions brought upon by the Java VM, we employ a selective CPS transform, which is driven entirely by effect-annotated types and leaves pure code in direct style. Benchmarks indicate that this high-level approach performs competitively.
Cite this item
Rompf, T., Maier, I., & Odersky, M. (2009). Implementing First-Class Polymorphic Delimited Continuations by a Type-Directed Selective CPS-Transform. Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, 317–328. https://doi.org/10.1145/1596550.1596596
Click Copy to copy the citation, or select the text manually.
icfp113-rompf.pdf
openaccess
231.02 KB
Adobe PDF
810a5520189dac07523d84bfd67b0024