Handlers of Algebraic Effects

  • Authors:
  • Gordon Plotkin;Matija Pretnar

  • Affiliations:
  • Laboratory for Foundations of Computer Science, School of Informatics, University of Edinburgh, Scotland;Laboratory for Foundations of Computer Science, School of Informatics, University of Edinburgh, Scotland

  • Venue:
  • ESOP '09 Proceedings of the 18th European Symposium on Programming Languages and Systems: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

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.