Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-09 Thread Henning Thielemann
On Wed, 8 Nov 2006, Nils Anders Danielsson wrote: > On Wed, 08 Nov 2006, Henning Thielemann <[EMAIL PROTECTED]> wrote: > > > If the Prelude would be splitted into modules, where (==) and (+) > > are separated, and no module imports the other one, then we need a > > third module, which states the

Re: Re[4]: [Haskell-cafe] Fractional/negative fixity?

2006-11-08 Thread Nicolas Frisby
Well let's see. First I'll assume that prec $! = $ is how $! was specified. Thus we know both ?? < $ and $! = $. Let's derive the relation between ?? and $! ?? < $ => ?? < $!{$ = $!} So I think that is pretty straight-forward. ":)" is a parse error... ;) This does bring up the interes

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-08 Thread Henning Thielemann
On Tue, 7 Nov 2006, David House wrote: > On 07/11/06, Jon Fairbairn <[EMAIL PROTECTED]> wrote: > > I must say though, that I don't like the reasoning that we > > can put in fractional fixities because it's a small > > change. The way to hell is through a series of small > > steps. If using intege

[Haskell-cafe] Fractional/negative fixity?

2006-11-08 Thread Henning Thielemann
On Wed, 8 Nov 2006, Bulat Ziganshin wrote: > Hello Nicolas, > > Wednesday, November 8, 2006, 1:25:23 AM, you wrote: > > > prec ?? < $ > > over-specification). You want ?? to bind more tightly than does $; > > that's exactly what this approach would let you specify. > > and how then compiler

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-08 Thread Bertram Felgenhauer
Simon Marlow wrote: > http://hackage.haskell.org/cgi-bin/haskell-prime/trac.cgi/wiki/FixityResolution What's the fate of unary minus under that proposal? In the Haskell report its syntax is part of the lexp^6 production. This production makes it possible to write (-1+) instead of (subtract 1), al

RE: Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-08 Thread Simon Marlow
Nicolas Frisby wrote: > Let's remember that if something is broke, it's only _right_ to _fix_ > it. I patiently waited for someone else to make that pun. > > Understanding the language won't be much harder, but understanding > fixity declarations will become a task. Consider: > > infixl -1.7521 --

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-08 Thread Joachim Durchholz
David House schrieb: Also, it provides an infinite space for fixities. I think the problem 'binds tighter than X but not as tight as Y', where X and Y are only fixity integer apart is somewhat common, and this would fix it. It would allow for extensibility into the future, where the operator spac

Re[4]: [Haskell-cafe] Fractional/negative fixity?

2006-11-08 Thread Bulat Ziganshin
Hello Nicolas, Wednesday, November 8, 2006, 1:25:23 AM, you wrote: > prec ?? < $ > over-specification). You want ?? to bind more tightly than does $; > that's exactly what this approach would let you specify. and how then compiler will guess that is relational priority of this operator compari

Re: Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Nicolas Frisby
Let's remember that if something is broke, it's only _right_ to _fix_ it. I patiently waited for someone else to make that pun. Understanding the language won't be much harder, but understanding fixity declarations will become a task. Consider: infixl -1.7521 -- what and why? As the operator s

Re: Re[2]: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Nicolas Frisby
I don't see how it's too complex. Isn't infixl ?? prec ?? < $ (??) = whenOperator exactly what you want to say? Sure you can solve the problem with negative fixities, but that's less expressive than the above (the total order is actually an over-specification). You want ?? to bind more tight

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread David House
On 07/11/06, Jon Fairbairn <[EMAIL PROTECTED]> wrote: I must say though, that I don't like the reasoning that we can put in fractional fixities because it's a small change. The way to hell is through a series of small steps. If using integers to express fixities is a bit of a hack, switching to r

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Jon Fairbairn
On 2006-11-07 at 18:30+0100 Henning Thielemann wrote: > On Tue, 7 Nov 2006, Simon Marlow wrote: > > > This is a much more heavyweight change, and its not a clear win. > > Haskell 2 ? :-) > > > If you'd like to make a concrete proposal, then feel free to do so and > > I'll make sure it gets onto

RE: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Henning Thielemann
On Tue, 7 Nov 2006, Simon Marlow wrote: > This is a much more heavyweight change, and its not a clear win. Haskell 2 ? :-) > If you'd like to make a concrete proposal, then feel free to do so and > I'll make sure it gets onto the wiki. What about the one of Jón Fairbairn ? http://www.haskell.

RE: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Simon Marlow
Henning Thielemann wrote: > On Tue, 7 Nov 2006, Simon Marlow wrote: > >> I'd support fractional and negative fixity. It's a simple change to >> make, but we also have to adopt >> >> > http://hackage.haskell.org/cgi-bin/haskell-prime/trac.cgi/wiki > /FixityResolution >> >> I've added the proposal t

RE: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Henning Thielemann
On Tue, 7 Nov 2006, Simon Marlow wrote: > I'd support fractional and negative fixity. It's a simple change to > make, but we also have to adopt > > http://hackage.haskell.org/cgi-bin/haskell-prime/trac.cgi/wiki/FixityResolution > > I've added the proposal to the end of that page. In fact, the

RE: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Simon Marlow
[EMAIL PROTECTED] 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 tho

Re: Re[2]: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Lennart Augustsson
But DEC's language FOCAL had fractional line numbers. :) On Nov 7, 2006, at 06:00 , Henning Thielemann wrote: On Mon, 6 Nov 2006, Bulat Ziganshin wrote: Hello Henning, Monday, November 6, 2006, 1:27:54 PM, you wrote: print msg `on` mode==debug but failed because my code frequently contai

Re[2]: [Haskell-cafe] Fractional/negative fixity?

2006-11-07 Thread Henning Thielemann
On Mon, 6 Nov 2006, Bulat Ziganshin wrote: > Hello Henning, > > Monday, November 6, 2006, 1:27:54 PM, you wrote: > > >> print msg `on` mode==debug > >> > >> but failed because my code frequently contains '$' and there is no way > >> to define operation with a lower precedence > > > This could

Re[2]: [Haskell-cafe] Fractional/negative fixity?

2006-11-06 Thread Bulat Ziganshin
Hello Henning, Monday, November 6, 2006, 1:27:54 PM, you wrote: >> print msg `on` mode==debug >> >> but failed because my code frequently contains '$' and there is no way >> to define operation with a lower precedence > This could be solved by the solutions proposed in this thread: > > http://

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-06 Thread Carl Witty
On Fri, 2006-11-03 at 18:07 -0800, Dan Weston wrote: > Here's an idea that (I think) is useful and backwards compatible: > fractional and negative fixity. > > There have been 3 separate times where I've wanted an operator just > above 0 ($) but less than 1 (>>= or >>>), or else just below 0 (lik

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-06 Thread Henning Thielemann
On Sat, 4 Nov 2006, Bulat Ziganshin 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

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-04 Thread Bulat Ziganshin
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=

[Haskell-cafe] Fractional/negative fixity?

2006-11-03 Thread Dan Weston
Here's an idea that (I think) is useful and backwards compatible: fractional and negative fixity. There have been 3 separate times where I've wanted an operator just above 0 ($) but less than 1 (>>= or >>>), or else just below 0 (like a superlow $$) infix 0.5 ??? infix -1 $$ The only cha