[Haskell-cafe] Fractional/negative fixity?
simonmar at microsoft.com
Tue Nov 7 10:50:04 EST 2006
haskell-prime-bounces at haskell.org wrote:
> Hello Dan,
> Saturday, November 4, 2006, 5:07:15 AM, you wrote:
>> Here's an idea that (I think) is useful and backwards compatible:
>> fractional and negative fixity.
> yes, i think the same. for example, once i've tried to define postfix
> 'when' operator like those in perl/ruby
> print msg `on` mode==debug
> but failed because my code frequently contains '$' and there is no way
> to define operation with a lower precedence
> really, there is another alternative to solve my particular problem:
> make `op` applications having fixed -1 precedence. such applications
> look "heavyweight" and once i have a wonderful debugging story just
> because for my eyes it was obvious that (a `div` b+1) means "do add
> before div"
I'd support fractional and negative fixity. It's a simple change to make, but we also have to adopt
I've added the proposal to the end of that page. In fact, the page already mentioned that we could generalise fixity levels, but it didn't mention fractional or negative values being allowed.
More information about the Haskell-Cafe