Simon Marlow marlowsd at
Mon Aug 3 06:12:03 EDT 2009

On 03/08/2009 10:44, Malcolm Wallace wrote:
>> all of these things are hurt by whitespace-sensitive syntax.  IMO, we
>> should think very carefully before introducing any.
> Haskell already has plenty of whitespace sensitivity. The layout rule is
> a pretty major part of the tradition. Other places:
> * ( differs from (Just . foo)
> * --| differs from -- |
> * With NegativeSyntax, (-1) would differ from (- 1)
> * In TemplateHaskell, $x differs from $ x
> * In TemplateHaskell, [d| differs from [ d |
> * With UnboxedTypes, (# differs from ( #
> * With UnboxedTypes, 3# differs from 3 #

Yes, I know.  There's also numbers: 1.0, 1e3, 0xFF.  And strictly 
speaking keywords are also in violation: "where by" vs. "whereby", 
although I wouldn't go so far as to suggest we change that, of course.

Only the first two items in your list are actually in Haskell, 
incedentally, and I argued against the others.  The problem is it's hard 
to find spare syntax, especially for brackets, without either adding 
whitespace-sensitivity or using non-ASCII characters.

The layout rule doesn't count, at least for the kind of 
whitespace-sensitivity I'm worried about, which is the presence/absence 
of whitespace rather than the quantity or composition of it.


More information about the Haskell-prime mailing list