On 01/12/2009 02:39, Malcolm Wallace wrote:

f1 x = x + case () of
() -> x
where x = 5

To be honest, it goes slightly against my intuition that the
pattern-match against () is accepted by the layout rule at all, because
it is indented further to the left than the case itself. Landin's
original rule was something like "everything strictly to the right and
below" belongs to the syntactic construct. This example breaks that
principle.

Yes - though that principle is deliberately not a part of the Haskell layout rule. You are free to argue that it should be, of course, though it would be a much deeper change than we're discussing here.

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to