Programming with Algebraic Effects and Handlers
Preprint
Abstract
Eff is a programming language based on the algebraic approach to computational effects, in which effects are viewed as algebraic operations and effect handlers as homomorphisms from free algebras. Eff supports first-class effects and handlers through which we may easily define new computational effects, seamlessly combine existing ones, and handle them in novel ways. We give a denotational semantics of eff and discuss a prototype implementation based on it. Through examples we demonstrate how the standard effects are treated in eff, and how eff supports programming techniques that use various forms of delimited continuations, such as backtracking, breadth-first search, selection functionals, cooperative multi-threading, and others.Keywords
All Related Versions
This publication has 9 references indexed in Scilit:
- Selection functions, bar recursion and backward inductionMathematical Structures in Computer Science, 2010
- Combining algebraic effects with continuationsTheoretical Computer Science, 2007
- Combining effects: Sum and tensorTheoretical Computer Science, 2006
- Modelling environments in call-by-value programming languagesInformation and Computation, 2003
- Algebraic Operations and Generic EffectsApplied Categorical Structures, 2003
- The Meaning of Types From Intrinsic to Extrinsic SemanticsBRICS Report Series, 2000
- The Definition of Standard ML1997
- Representing Control: a Study of the CPS TransformationMathematical Structures in Computer Science, 1992
- A theory of type polymorphism in programmingJournal of Computer and System Sciences, 1978