2014 Applicative => Monad proposal
Dan Doel
dan.doel at gmail.com
Fri May 24 02:23:28 CEST 2013
+1
On Thu, May 23, 2013 at 6:01 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> One interesting question about the Haskell Report is if we should
> generalize the following translation:
>
> do {e;stmts}=e >> do {stmts}
>
> to:
>
> do {e;stmts}=e *> do {stmts}
There are other situations where one can desugar to just applicatives that
I wouldn't mind seeing. But they of course haven't been implemented
anywhere.
For instance, the comprehension:
[ e1 | x <- e2, y <- e3, ... ]
can be translated to:
(\x y ... -> e1) <$> e2 <*> ...
so long as x, y ... aren't free in e2, e3 ....
I don't think any of this should be considered until the details have been
worked out and implemented, of course.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130523/b998d29a/attachment.htm>
More information about the Libraries
mailing list