ABSTRACT
Plotkin and Power's algebraic effects combined with Plotkin and Pretnar's effect handlers provide a foundation for modular programming with effects. We present a generalisation of algebraic effects and effect handlers to support other kinds of effectful computations corresponding to McBride and Paterson's idioms and Hughes' arrows.
- A. Bauer and M. Pretnar. Programming with algebraic effects and handlers. CoRR, abs/1203.1539, 2012.Google Scholar
- A. Bauer and M. Pretnar. An effect system for algebraic effects and handlers. In CALCO, volume 8089 of Lecture Notes in Computer Science, pages 1--16. Springer, 2013.Google Scholar
- E. Brady. Programming and reasoning with algebraic effects and dependent types. In ICFP. ACM, 2013. Google ScholarDigital Library
- P. Capriotti and A. Kaposi. Free applicative functors. CoRR, abs/1403.0749, 2014.Google Scholar
- E. Cooper, S. Lindley, P. Wadler, and J. Yallop. The essence of form abstraction. In G. Ramalingam, editor, APLAS, volume 5356 of Lecture Notes in Computer Science, pages 205--220. Springer, 2008. Google ScholarDigital Library
- B. C. d. S. Oliveira, T. Schrijvers, and W. R. Cook. MRI: Modular reasoning about interference in incremental programming. J. Funct. Program., 22 (6): 797--852, 2012. Google ScholarDigital Library
- J. Hughes. Generalising monads to arrows. Sci. Comput. Program., 37 (1--3): 67--111, 2000. Google ScholarDigital Library
- O. Kammar, S. Lindley, and N. Oury. Handlers in action. In G. Morrisett and T. Uustalu, editors, ICFP, pages 145--158. ACM, 2013. Google ScholarDigital Library
- O. Kiselyov, A. Sabry, and C. Swords. Extensible effects: an alternative to monad transformers. In Haskell, pages 59--70. ACM, 2013. Google ScholarDigital Library
- P. B. Levy. Call-By-Push-Value: A Functional/Imperative Synthesis, volume 2 of Semantics Structures in Computation. Springer, 2004. Google ScholarDigital Library
- S. Lindley. Free idioms and free arrows in haskell, 2013. https://github.com/slindley/dependent-haskell/tree/master/Free.Google Scholar
- S. Lindley. Aspect oriented programming with handlers, 2013. https://github.com/slindley/effect-handlers/blob/master/Examples/AOP.hs.Google Scholar
- S. Lindley, P. Wadler, and J. Yallop. The arrow calculus. J. Funct. Program., 20 (1): 51--69, 2010. Google ScholarDigital Library
- S. Lindley, P. Wadler, and J. Yallop. Idioms are oblivious, arrows are meticulous, monads are promiscuous. Electr. Notes Theor. Comput. Sci., 229 (5): 97--117, 2011. Google ScholarDigital Library
- C. McBride. How might effectful programs look? In Workshop on Effects and Type Theory, 2007. http://cs.ioc.ee/efftt/mcbride-slides.pdf.Google Scholar
- C. McBride. Frank (0.3), 2012. http://hackage.haskell.org/package/Frank.Google Scholar
- C. McBride and R. Paterson. Applicative programming with effects. J. Funct. Program., 18 (1): 1--13, 2008. Google ScholarDigital Library
- E. Moggi. Computational lambda-calculus and monads. In LICS, pages 14--23. IEEE Computer Society, 1989. Google ScholarDigital Library
- R. Paterson. A new notation for arrows. In B. C. Pierce, editor, ICFP, pages 229--240. ACM, 2001. Google ScholarDigital Library
- T. Petricek and D. Syme. The F# computation expression zoo. In M. Flatt and H.-F. Guo, editors, PADL, volume 8324 of Lecture Notes in Computer Science, pages 33--48. Springer, 2014.Google Scholar
- G. D. Plotkin and J. Power. Adequacy for algebraic effects. In F. Honsell and M. Miculan, editors, FoSSaCS, volume 2030 of Lecture Notes in Computer Science, pages 1--24. Springer, 2001. Google ScholarDigital Library
- G. D. Plotkin and J. Power. Semantics for algebraic operations. Electr. Notes Theor. Comput. Sci., 45: 332--345, 2001.Google ScholarCross Ref
- G. D. Plotkin and M. Pretnar. Handling algebraic effects. Logical Methods in Computer Science, 9 (4), 2013.Google Scholar
- S. D. Swierstra. Combinator parsing: A short tutorial. In LerNet ALFA Summer School, volume 5520 of Lecture Notes in Computer Science, pages 252--300. Springer, 2008. Google ScholarDigital Library
- W. Swierstra. Data types à la carte. J. Funct. Program., 18 (4): 423--436, 2008. Google ScholarDigital Library
- J. Yallop. Abstraction for web programming. PhD thesis, The University of Edinburgh, 2010.Google Scholar
Index Terms
- Algebraic effects and effect handlers for idioms and arrows
Recommendations
Handlers for Non-Monadic Computations
IFL '17: Proceedings of the 29th Symposium on the Implementation and Application of Functional Programming LanguagesAlgebraic effects and handlers are a convenient method for structuring monadic effects with primitive effectful operations and separating the syntax from the interpretation of these operations. However, the scope of conventional handlers are somewhat ...
Idioms are Oblivious, Arrows are Meticulous, Monads are Promiscuous
We revisit the connection between three notions of computation: Moggi s monads, Hughes s arrows and McBride and Paterson s idioms (also called applicative functors). We show that idioms are equivalent to arrows that satisfy the type isomorphism A B 1 (A ...
Scoped Effects as Parameterized Algebraic Theories
Programming Languages and SystemsAbstractNotions of computation can be modelled by monads. Algebraic effects offer a characterization of monads in terms of algebraic operations and equational axioms, where operations are basic programming features, such as reading or updating the state, ...
Comments