Typed Equivalence of Effect Handlers and Delimited Control

Maciej Piróg, Piotr Polesiuk, Filip Sieczkowski, Michael Wagner
2019 International Conference on Rewriting Techniques and Applications  
It is folklore that effect handlers and delimited control operators are closely related: recently, this relationship has been proved in an untyped setting for deep handlers and the shift0 delimited control operator. We positively resolve the conjecture that in an appropriately polymorphic type system this relationship can be extended to the level of types, by identifying the necessary forms of polymorphism, thus extending the definability result to the typed context. In the process, we identify
more » ... a novel and potentially interesting type system feature for delimited control operators. Moreover, we extend these results to substantiate the folklore connection between shallow handlers and control0 flavour of delimited control, both in an untyped and typed settings. ACM Subject Classification Theory of computation → Control primitives; Theory of computation → Operational semantics; Software and its engineering → Polymorphism Keywords and phrases type-and-effect systems, algebraic effects, delimited control, macro expressibility Digital Object Identifier 10.4230/LIPIcs.FSCD.2019.30 Supplement Material The formalisation of results presented in this paper, performed in the Coq proof assistant, can be found at https://pl-uwr.bitbucket.io/efftrans.zip.
doi:10.4230/lipics.fscd.2019.30 dblp:conf/rta/PirogPS19 fatcat:si7sotnph5eibnm433zi74csie