Computational lambda-calculus and monads
Proceedings of the Fourth Annual Symposium on Logic in computer science
Monad transformers and modular interpreters
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Algebra of programming
Notions of Computation Determine Monads
FoSSaCS '02 Proceedings of the 5th International Conference on Foundations of Software Science and Computation Structures
FroCoS '02 Proceedings of the 4th International Workshop on Frontiers of Combining Systems
Combining Computational Effects: commutativity & sum
TCS '02 Proceedings of the IFIP 17th World Computer Congress - TC1 Stream / 2nd IFIP International Conference on Theoretical Computer Science: Foundations of Information Technology in the Era of Networking and Mobile Computing
Proceedings of the 1992 Glasgow Workshop on Functional Programming
Category Theory and Computer Science
Monads and Modular Term Rewriting
CTCS '97 Proceedings of the 7th International Conference on Category Theory and Computer Science
Abstract Syntax and Variable Binding
LICS '99 Proceedings of the 14th Annual IEEE Symposium on Logic in Computer Science
Explicit substitutions and higher-order syntax
MERLIN '03 Proceedings of the 2003 ACM SIGPLAN workshop on Mechanized reasoning about languages with variable binding
ACM SIGPLAN Notices
Explicit substitutions and higher-order syntax
Higher-Order and Symbolic Computation
Structured formal development in Isabelle
Nordic Journal of Computing - Selected papers of the 17th nordic workshop on programming theory (NWPT'05), October 19-21, 2005
Combining algebraic effects with continuations
Theoretical Computer Science
A history of Haskell: being lazy with class
Proceedings of the third ACM SIGPLAN conference on History of programming languages
Haskell '07 Proceedings of the ACM SIGPLAN workshop on Haskell workshop
Building Verification Condition Generators by Compositional Extension
Electronic Notes in Theoretical Computer Science (ENTCS)
Monad compositions ii: Kleisli strength
Mathematical Structures in Computer Science
Journal of Functional Programming
Making monads first-class with template haskell
Proceedings of the first ACM SIGPLAN symposium on Haskell
ESOP '09 Proceedings of the 18th European Symposium on Programming Languages and Systems: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
Monad transformers as monoid transformers
Theoretical Computer Science
Modularity and Implementation of Mathematical Operational Semantics
Electronic Notes in Theoretical Computer Science (ENTCS)
A bottom-up approach to understand functional programs
Proceedings of The Fourth International C* Conference on Computer Science and Software Engineering
A counterexample to tensorability of effects
CALCO'11 Proceedings of the 4th international conference on Algebra and coalgebra in computer science
Bimonadic semantics for basic pattern matching calculi
MPC'06 Proceedings of the 8th international conference on Mathematics of Program Construction
Proof abstraction for imperative languages
APLAS'06 Proceedings of the 4th Asian conference on Programming Languages and Systems
The sequential semantics of producer effect systems
POPL '13 Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Extensible effects: an alternative to monad transformers
Proceedings of the 2013 ACM SIGPLAN symposium on Haskell
Hi-index | 0.00 |
Monads are a useful abstraction of computation, as they model diverse computational effects such as stateful computations, exceptions and I/O in a uniform manner. Their potential to provide both a modular semantics and a modular programming style was soon recognised. However, in general, monads proved difficult to compose and so research focused on special mechanisms for their composition such as distributive monads and monad transformers.We present a new approach to this problem which is general in that nearly all monads compose, mathematically elegant in using the standard categorical tools underpinning monads and computationally expressive in supporting a canonical recursion operator. In a nutshell, we propose that two monads should be composed by taking their coproduct. Although abstractly this is a simple idea, the actual construction of the coproduct of two monads is non-trivial. We outline this construction, show how to implement the coproduct within Haskell and demonstrate its usage with a few examples. We also discuss its relationship with other ways of combining monads, in particular distributive laws for monads and monad transformers.