Handlers in action

Ohad Kammar, Sam Lindley, Nicolas Oury

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

Abstract

Plotkin and Pretnar's handlers for algebraic effects occupy a sweet spot in the design space of abstractions for effectful computation. By separating effect signatures from their implementation, algebraic effects provide a high degree of modularity, allowing programmers to express effectful programs independently of the concrete interpretation of their effects. A handler is an interpretation of the effects of an algebraic computation. The handler abstraction adapts well to multiple settings: pure or impure, strict or lazy, static types or dynamic types. This is a position paper whose main aim is to popularise the handler abstraction. We give a gentle introduction to its use, a collection of illustrative examples, and a straightforward operational semantics. We describe our Haskell implementation of handlers in detail, outline the ideas behind our OCaml, SML, and Racket implementations, and present experimental results comparing handlers with existing code.
Original languageEnglish
Title of host publicationACM SIGPLAN International Conference on Functional Programming, ICFP'13, Boston, MA, USA - September 25 - 27, 2013
PublisherACM
Pages145-158
Number of pages14
ISBN (Print)978-1-4503-2326-0
DOIs
Publication statusPublished - 2013

Fingerprint

Dive into the research topics of 'Handlers in action'. Together they form a unique fingerprint.

Cite this