haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] Re: Re: Re: monad subexpressions

Subject: Re: [Haskell-cafe] Re: Re: Re: monad subexpressions
From: david48
Date: Fri, 3 Aug 2007 23:10:10 +0200
On 8/3/07, Neil Mitchell <ndmitchell@xxxxxxxxx> wrote:

> > Is it not possible that is desugars to

> > do case x of
> >          [] -> return 1
> >          (y:ys) -> g y >>= \temp -> f temp

> See the rule about always binding to the previous line of a do block.
> This case then violates that.

I assumed that the example was equivalent to :

do case x of
         [] -> return 1
         (y:ys) -> do f (<- g y)

Shouldn't the rule work then ?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>