Combining algebraic effects with continuations

  • Authors:
  • Martin Hyland;Paul Blain Levy;Gordon Plotkin;John Power

  • Affiliations:
  • Department of Mathematics, University of Cambridge, Cambridge CB3 0WB, England, United Kingdom;School of Computer Science, University of Birmingham, Birmingham B15 2TT, England, United Kingdom;Laboratory for the Foundations of Computer Science, School of Informatics, University of Edinburgh, Kings Buildings, Edinburgh EH9 3JZ, Scotland, United Kingdom;Laboratory for the Foundations of Computer Science, School of Informatics, University of Edinburgh, Kings Buildings, Edinburgh EH9 3JZ, Scotland, United Kingdom

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2007

Quantified Score

Hi-index 5.23

Visualization

Abstract

We consider the natural combinations of algebraic computational effects such as side-effects, exceptions, interactive input/output, and nondeterminism with continuations. Continuations are not an algebraic effect, but previously developed combinations of algebraic effects given by sum and tensor extend, with effort, to include commonly used combinations of the various algebraic effects with continuations. Continuations also give rise to a third sort of combination, that given by applying the continuations monad transformer to an algebraic effect. We investigate the extent to which sum and tensor extend from algebraic effects to arbitrary monads, and the extent to which Felleisen et al.'s C operator extends from continuations to its combination with algebraic effects. To do all this, we use Dubuc's characterisation of strong monads in terms of enriched large Lawvere theories.