Proposal: change to qualified operator syntax

haskell at henning-thielemann.de haskell at henning-thielemann.de
Mon Jul 13 17:00:27 EDT 2009


On Mon, 13 Jul 2009, Simon Marlow wrote:

> On 12/07/2009 22:32, haskell at henning-thielemann.de wrote:
>> 
>> Should the consistency with operator section also be added as 'cons' to
>> http://hackage.haskell.org/trac/haskell-prime/wiki/QualifiedOperators
>> ?
>
> So correct me if I'm wrong; the point you're making is:
>
>             left section  right section   prefix
> unqualified  (+ 1)         (1 +)           (+)
> Haskell 98   (M.+ 1)       (1 M.+)         (M.+)
> proposed     (`M.(+)` 1)   (1 `M.(+)`)     M.(+)
>   or(*)     (M.(+) 1)     (flip M.(+) 1)
>
> (*) only if precedence isn't important, e.g. not in cases like (`M.(+)` x 
> `M.(*)` y).


Yes, that's what I meant. Thanks for working it out!


More information about the Haskell-prime mailing list