Shallow Effect Handlers

Daniel Hillerström, Sam Lindley

Research output: Chapter in Book/Report/Conference proceedingConference contribution


Plotkin and Pretnar’s effect handlers offer a versatile abstraction for modular programming with user-defined effects. Traditional deep handlers are defined by folds over computation trees. In this paper we study shallow handlers, defined instead by case splits over computation trees. We show that deep and shallow handlers can simulate one another up to specific notions of administrative reduction. We present the first formal accounts of an abstract machine for shallow handlers and a Continuation Passing Style (CPS) translation for shallow handlers taking special care to avoid memory leaks. We provide implementations in the Links web programming language and empirically verify that neither implementation introduces unwarranted memory leaks.
Original languageEnglish
Title of host publicationProceedings of 16th Asian Symposium on Programming Languages and Systems (APLAS) 2018
Place of PublicationWellington, New Zealand
PublisherSpringer, Cham
Number of pages20
ISBN (Electronic)978-3-030-02768-1
ISBN (Print)978-3-030-02767-4
Publication statusE-pub ahead of print - 22 Oct 2018
Event16th Asian Symposium on Programming Languages and Systems - Wellington, New Zealand
Duration: 2 Dec 20186 Dec 2018

Publication series

NameLecture Notes in Computer Science
PublisherSpringer, Cham
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349
NameProgramming and Software Engineering


Conference16th Asian Symposium on Programming Languages and Systems
Abbreviated titleAPLAS 2018
Country/TerritoryNew Zealand
Internet address


Dive into the research topics of 'Shallow Effect Handlers'. Together they form a unique fingerprint.

Cite this