Handlers in action

Ohad Kammar, Sam Lindley, Nicolas Oury

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

34 Citations (Scopus)

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 publicationICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
PublisherAssociation for Computing Machinery
Pages145-158
Number of pages14
ISBN (Print)9781450323260
DOIs
Publication statusPublished - Sep 2013
Event18th ACM SIGPLAN International Conference on Functional Programming 2013 - Boston, MA, United States
Duration: 25 Sep 201327 Sep 2013

Conference

Conference18th ACM SIGPLAN International Conference on Functional Programming 2013
Abbreviated titleICFP 2013
CountryUnited States
CityBoston, MA
Period25/09/1327/09/13

Keywords

  • Algebraic effects
  • Continuations
  • Effect handlers
  • Effect typing
  • Haskell
  • Modularity
  • Monads

ASJC Scopus subject areas

  • Software

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

  • Cite this

    Kammar, O., Lindley, S., & Oury, N. (2013). Handlers in action. In ICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programming (pp. 145-158). Association for Computing Machinery. https://doi.org/10.1145/2500365.2500590