Handlers of Algebraic Effects

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.

[1]  Gordon D. Plotkin,et al.  A Logic for Algebraic Effects , 2008, 2008 23rd Annual IEEE Symposium on Logic in Computer Science.

[2]  Gordon D. Plotkin,et al.  Computational Effects and Operations: An Overview , 2004, Electron. Notes Theor. Comput. Sci..

[3]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[4]  George Gratzer,et al.  Universal Algebra , 1979 .

[5]  Frank Pfenning,et al.  System Description: Twelf - A Meta-Logical Framework for Deductive Systems , 1999, CADE.

[6]  Donald Sannella,et al.  Horizontal Composability Revisited , 2006, Essays Dedicated to Joseph A. Goguen.

[7]  Robin Milner,et al.  Theories for the Global Ubiquitous Computer , 2004, FoSSaCS.

[8]  Chris Mellish,et al.  Programming in Prolog (2nd ed.) , 1984 .

[9]  Gordon D. Plotkin,et al.  Algebraic Operations and Generic Effects , 2003, Appl. Categorical Struct..

[10]  Gordon D. Plotkin,et al.  Combining algebraic effects with continuations , 2007, Theor. Comput. Sci..

[11]  Andrzej Filinski,et al.  Representing layered monads , 1999, POPL '99.

[12]  Gordon D. Plotkin,et al.  Adequacy for Algebraic Effects , 2001, FoSSaCS.

[13]  Simon L. Peyton Jones Haskell 98 Libraries: Bibliography , 2003, J. Funct. Program..

[14]  Paul Blain Levy Monads and Adjunctions for Global Exceptions , 2006, MFPS.

[15]  Gordon D. Plotkin,et al.  Combining effects: Sum and tensor , 2006, Theor. Comput. Sci..

[16]  Gordon D. Plotkin,et al.  Notions of Computation Determine Monads , 2002, FoSSaCS.

[17]  Robin Milner,et al.  Algebraic laws for nondeterminism and concurrency , 1985, JACM.

[18]  Nick Benton,et al.  Exceptional syntax , 2001, Journal of Functional Programming.

[19]  Robin Milner,et al.  A Calculus of Communicating Systems , 1980, Lecture Notes in Computer Science.

[20]  John Power,et al.  Countable Lawvere Theories and Computational Effects , 2006, MFCSIT.

[21]  Gordon D. Plotkin,et al.  Some Varieties of Equational Logic , 2006, Essays Dedicated to Joseph A. Goguen.

[22]  Herbert B. Enderton,et al.  A mathematical introduction to logic , 1972 .

[23]  Nick Benton,et al.  Monads and Effects , 2000, APPSEM.

[24]  Amr Sabry,et al.  The essence of compiling with continuations , 1993, PLDI '93.

[25]  William F. Clocksin,et al.  Programming in Prolog , 1987, Springer Berlin Heidelberg.

[26]  Paul Blain Levy,et al.  Call-by-push-value: Decomposing call-by-value and call-by-name , 2006, High. Order Symb. Comput..

[27]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..