On Tue, 2009-12-01 at 02:39 +0000, 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.

and it would mean throwing out code like:

f x = case g x of
  Case1 -> ...
  Case2 -> ...

which is a common pattern. You then have to use:

f x =
  case g x of
    Case1 -> ...
    Case2 -> ...

and my terminal is only 80 columns wide. I need those extra two
columns! :-)

Duncan

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

Reply via email to