[Haskell-cafe] Re: Re: Re: monad subexpressions
dav.vire+haskell at gmail.com
Fri Aug 3 17:10:10 EDT 2007
On 8/3/07, Neil Mitchell <ndmitchell at gmail.com> 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 ?
More information about the Haskell-Cafe