An Effect System for Algebraic Effects and Handlers

We present an effect system for algebraic effects and handlers. Because handlers may transform an effectful computation into a pure one, the effect system is non-monotone in the sense that effects do not just accumulate, but may also be deleted from types or generally transformed. We also provide denotational semantics for the effect system, based on a domain-theoretic model with partial equivalence relations. The semantics validates equational reasoning about effectful computations.

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

[2]  Pierre Jouvelot,et al.  Polymorphic type, region and effect inference , 1992, Journal of Functional Programming.

[3]  Robin Milner,et al.  Definition of standard ML , 1990 .

[4]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

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

[6]  Matija Pretnar,et al.  Logic and handling of algebraic effects , 2010 .

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

[8]  Andrew M. Pitts,et al.  A New Approach to Abstract Syntax with Variable Binding , 2002, Formal Aspects of Computing.

[9]  John C. Reynolds,et al.  The Meaning of Types From Intrinsic to Extrinsic Semantics , 2000 .

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

[11]  Ohad Kammar,et al.  Handlers in action , 2013, ICFP.

[12]  Andrej Bauer,et al.  Programming with algebraic effects and handlers , 2012, J. Log. Algebraic Methods Program..

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

[14]  Gordon D. Plotkin,et al.  Handlers of Algebraic Effects , 2009, ESOP.

[15]  Ohad Kammar,et al.  Algebraic foundations for effect-dependent optimisations , 2012, POPL '12.

[16]  Hayo Thielecke,et al.  Modelling environments in call-by-value programming languages , 2003, Inf. Comput..

[17]  Ryan Stansifer,et al.  Type inference with subtypes , 1988, POPL '88.

[18]  Ian Stark Categorical models for local names , 1996, LISP Symb. Comput..

[19]  Philip Wadler,et al.  The marriage of effects and monads , 1998, ICFP '98.