Last generator in do {...}

Mark Carroll
Wed, 30 Oct 2002 09:09:05 -0500 (EST)

On Wed, 30 Oct 2002, Andrew J Bromage wrote:
> 	main = do foo <- bar
>                 return foo
>                 ^ offside error, Haskell interprets this as not being
>                   part of the do expression

Gosh, I find that unintuitive, given, say,
- though I'd also been surprised to not be able to get away with,

   let square = x
      ellipse = y

so clearly the offside rule is still capable of confusing me. I should go
re-read a FAQ perhaps! (-:

-- Mark