Desugaring do-notation to Applicative

Simon Marlow marlowsd
Fri Oct 11 09:57:40 UTC 2013


On 02/10/13 17:01, Dag Odenhall wrote:
> What about |MonadComprehensions|, by the way? The way I see it, it's an
> even better fit for |Applicative| because the |return| is implicit.

It would happen automatically, because a Monad comprehension is 
represented using the same abstract syntax as a do-expression internally.

Cheers,
Simon



>
>
> On Tue, Oct 1, 2013 at 2:39 PM, Simon Marlow <marlowsd at gmail.com
> <mailto:marlowsd at gmail.com>> wrote:
>
>     Following a couple of discussions at ICFP I've put together a
>     proposal for desugaring do-notation to Applicative:
>
>     http://ghc.haskell.org/trac/__ghc/wiki/ApplicativeDo
>     <http://ghc.haskell.org/trac/ghc/wiki/ApplicativeDo>
>
>     I plan to implement this following the addition of Applicative as a
>     superclass of Monad, which is due to take place shortly after the
>     7.8 branch is cut.
>
>     Please discuss here, and I'll update the wiki page as necessary.
>
>     Cheers,
>     Simon
>     _________________________________________________
>     Glasgow-haskell-users mailing list
>     Glasgow-haskell-users at haskell.__org
>     <mailto:Glasgow-haskell-users at haskell.org>
>     http://www.haskell.org/__mailman/listinfo/glasgow-__haskell-users
>     <http://www.haskell.org/mailman/listinfo/glasgow-haskell-users>
>
>




More information about the Glasgow-haskell-users mailing list