Bang patterns

Ian Lynagh ian at
Tue Feb 5 00:42:08 CET 2013

On Mon, Feb 04, 2013 at 10:37:44PM +0000, Simon Peyton-Jones wrote:
> I don't have a strong opinion about whether
> 	f ! x y ! z = e
> should mean the same; ie whether the space is significant.   I think it's probably more confusing if the space is significant (so its presence or absence makes a difference).

I also don't feel strongly, although I lean the other way:

I don't think anyone writes "f ! x" when they mean "f with a strict
argument x", and I don't see any particular advantage in allowing it.
In fact, I think writing that is less clear than "f !x", so there is an
advantage in disallowing it.

It also means that existing code that defines a (!) operator in infix
style would continue to work, provided it puts whitespace around the !. 


More information about the Haskell-prime mailing list