Bringing back Monad Comprehensions (in style)

Simon Marlow marlowsd at gmail.com
Wed Oct 6 04:43:58 EDT 2010


On 06/10/2010 00:26, Max Bolingbroke wrote:
> On 5 October 2010 15:41, George Giorgidze<giorgidze at gmail.com>  wrote:
>> One can also look at how recently introduced 'order by' and 'group by'
>> constructs generalise to monad comprehensions. If that works, one could
>> implement even more "stylish" monad comprehension notation.
>
> They do: see the comments by MichaelAdams at
> http://haskell.org/haskellwiki/Simonpj/Talk:ListComp. Last I checked,
> the code there was slightly buggy but correct in spirit.
>
> What *doesn't* generalise is the zip comprehensions extension:
>
> [(x, y) | x<- xs | y<- ys] == zip xs ys

I wonder how much that extension is actually used, e.g. in all of 
Hackage?  Could we deprecate it?

Cheers,
	Simon




More information about the Glasgow-haskell-users mailing list