Header menu link for other important links
X
Continuation passing style for effect handlers
Hillerström D., Lindley S., Atkey R.,
Published in Drops
2017
Volume: 84
   
Abstract
We present Continuation Passing Style (CPS) translations for Plotkin and Pretnar's effect handlers with Hillerström and Lindley's row-Typed fine-grain call-by-value calculus of effect handlers as the source language. CPS translations of handlers are interesting theoretically, to explain the semantics of handlers, and also offer a practical implementation technique that does not require special support in the target language's runtime. We begin with a first-order CPS translation into untyped lambda calculus which manages a stack of continuations and handlers as a curried sequence of arguments. We then refine the initial CPS translation first by uncurrying it to yield a properly tail-recursive translation and second by making it higher-order in order to contract administrative redexes at translation time. We prove that the higher-order CPS translation simulates effect handler reduction. We have implemented the higher-order CPS translation as a JavaScript backend for the Links programming language. © Daniel Hillerström, Sam Lindley, Robert Atkey, and K. C. Sivaramakrishnan.
About the journal
JournalLeibniz International Proceedings in Informatics, LIPIcs
PublisherDrops
Open AccessNo