patch applied (haskell-prime-status): add ""Make $ left associative, like application"

Simon Marlow marlowsd at gmail.com
Wed Apr 23 12:52:11 EDT 2008


Duncan Coutts wrote:
> On Tue, 2008-04-22 at 21:02 -0400, Dan Doel wrote:
> 
>> 3) Left associative ($) is consistent with left associative ($!). The right 
>> associative version of the latter is inconvenient, because it only allows 
>> things to be (easily) strictly applied to the last argument of a function.
> 
> What about having ! as a left associative strict apply operator?
> 
> f !x !y !z
> 
> Isn't there already a proposal along these lines? There is certainly a
> proposal to stop using ! for array indexing.

The problem with this is that

   f !x y

would associate differently in an expression than it does on the left 
hand side of an equation, where ! is the prefix bang-pattern operator. 
To make this consistent we'd have to make ! a prefix operator in 
expressions, or give it the same precedence as function application; 
both mean a new extension.

Cheers,
	Simon


More information about the Haskell-prime mailing list