[Haskell-cafe] generalized list comprehensions

Derek Elkins derek.a.elkins at gmail.com
Sun Nov 9 13:47:55 EST 2008

On Sun, 2008-11-09 at 10:15 +0000, Max Bolingbroke wrote:
> 2008/11/9 Johannes Waldmann <waldmann at imn.htwk-leipzig.de>:
> > NB: Wasn't there a time (before "do") when "list" notation (brackets)
> > would work in any monad? And "map" was a method in "Functor",
> > and we had "class Functor m => Monad m", etc. Well well well times have
> > changed.
> Sure, I believe the feature was called "monad comprehensions". AFAIK
> it was removed because it gave confusing error messages to new users
> of the language (what is this Monad thing? I just want a list of
> stuff!).
> List comprehensions really have diverged from being a special "do"
> notation at the list monad, since you are able to write comprehensions
> like [(x, y) | x <- xs | y <- ys], and it's not clear how to define
> "zip" for a monad - but perhaps there is some extension of a monad
> where it makes sense?

As far as I can tell, no one actually uses parallel list comprehensions.
With any luck, the same will be true for generalized list

More information about the Haskell-Cafe mailing list