Polymonad programming in Haskell
Jan Bracker, Henrik Nilsson · 2015
Polymonads were recently introduced by Hicks et al. as a unified approach to programming with different notions of monads. Their work was mainly focused on foundational aspects of the approach. In this article, we show how to incorporate the notion of polymonads into Haskell, which is the first time this has been done in a full-scale language. In particular, we show how polymonads can be represented in Haskell, give a justification of the representation through proofs in Agda, and provide a plugin for the Glasgow Haskell Compiler (GHC) that enables their use in practice. Finally, we demonstrate the utility of our system by means of examples concerned with session types and the parameterized effect monad. This work provides a common representation of a number of existing approaches to generalized monads in Haskell.
Cited by 6 works. doi:10.1145/2897336.2897340
Authors
References
- An axiomatic basis for computer programming
- An axiomatic basis for computer programming
- Notions of computation and monads
- IEEE Computer Society Press
- Computational lambda-calculus and monads
- The essence of functional programming
- Generalising monads to arrows
- Towards a practical programming language based on dependent type theory
- Applicative programming with effects
- Type Classes with Functional Dependencies