Handlers of Algebraic Effects

  • Gordon Plotkin
  • Matija Pretnar
Conference paper

DOI: 10.1007/978-3-642-00590-9_7

Part of the Lecture Notes in Computer Science book series (LNCS, volume 5502)
Cite this paper as:
Plotkin G., Pretnar M. (2009) Handlers of Algebraic Effects. In: Castagna G. (eds) Programming Languages and Systems. ESOP 2009. Lecture Notes in Computer Science, vol 5502. Springer, Berlin, Heidelberg

Abstract

We present an algebraic treatment of exception handlers and, more generally, introduce handlers for other computational effects representable by an algebraic theory. These include nondeterminism, interactive input/output, concurrency, state, time, and their combinations; in all cases the computation monad is the free-model monad of the theory. Each such handler corresponds to a model of the theory for the effects at hand. The handling construct, which applies a handler to a computation, is based on the one introduced by Benton and Kennedy, and is interpreted using the homomorphism induced by the universal property of the free model. This general construct can be used to describe previously unrelated concepts from both theory and practice.

Download to read the full conference paper text

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Gordon Plotkin
    • 1
  • Matija Pretnar
    • 1
  1. 1.Laboratory for Foundations of Computer Science, School of InformaticsUniversity of EdinburghScotland

Personalised recommendations