> I think this one should be allowed; I can't remember anything in the
> Haskell Report that says the lexical scoped must be strictly
> increasing in indentation.
No, the report is silent on this issue, as far as I can remember, but
this means that it is ambiguous.
> f a
> = do
> case a of
> (Just x, _) -> return x
> _ -> error "hey"
Since the `(' is at the same level as `case' it should
generate a semi-colon according to the rules. There is
nothing in the report that says that entering a new
layout should suspend processing the outer one.
I think it is clear that we want to allow the function
above so the report should be clarified.
Something that Hugs allows, but that is illegal
according to the report is
> f a
> = do
> if x then
> y
> else
> z
The `else' generates a semi-colon which makes this
illegal. Still, I would like to be able to write this.
-- Lennart