Bringing back monad comprehensions
George Giorgidze, Torsten Grust, Nils Schweinsberg, Jeroen Weijers
Abstract
This paper is about a Glasgow Haskell Compiler (GHC) extension that generalises Haskell's list comprehension notation to monads. The monad comprehension notation implemented by the extension supports generator and filter clauses, as was the case in the Haskell 1.4 standard. In addition, the extension generalises the recently proposed parallel and SQL-like list comprehension notations to monads. The aforementioned generalisations are formally defined in this paper. The extension will be available in GHC 7.2.
Related papers
- Towards a comprehensive theory of monadic effects ICFP 2011
- "The World of Scripting Languages" by David W. Barron, John Wiley & Sons, 2000, ISBN 0-471-99886-9 JFP 2003
- "Implicit parallel programming in pH" by R. S. Nikhil and Arvind, Morgan Kaufmann, 2001 JFP 2003
- "Algorithms: A Functional Programming Approach" by Fethi Rabhi and Guy Lapalme, Addison-Wesley, 1999, ISBN 0-201-59604-0, xi + 235pp JFP 2003
- "Structure and Interpretation of Classical Mechanics" by Gerald Jay Sussman and Jack Wisdom with Meinhard E. Mayer, The MIT Press; 2001, ISBN 0262194554 JFP 2003
- "Essentials of Programming Languages" (2nd ed) by Daniel P. Friedman, Mitchell Wand and Christopher T. Haynes, MIT Press, ISBN 0-262-06217-8, 2001 JFP 2003
- Effectful Lenses: There and Back with Different Monads ICFP 2025
- Purity of an ST monad: full abstraction by semantically typed back-translation OOPSLA 2022