Re: Fractional/negative fixity?

2006-11-10 Thread Ben Rudiak-Gould
[EMAIL PROTECTED] wrote: I think that computable real fixity levels are useful, too. Only finitely many operators can be declared in a given Haskell program. Thus the strongest property you need in your set of precedence levels is that given arbitrary finite sets of precedences A and B, with

Re: Fractional/negative fixity?

2006-11-10 Thread Ben Rudiak-Gould
I'm surprised that no one has mentioned showsPrec and readsPrec. Anything more complicated than negative fixities would require their interfaces to be changed. -- Ben ___ Haskell-prime mailing list Haskell-prime@haskell.org

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

2006-11-10 Thread Henning Thielemann
On Fri, 10 Nov 2006, Ben Rudiak-Gould wrote: I'm surprised that no one has mentioned showsPrec and readsPrec. Anything more complicated than negative fixities would require their interfaces to be changed. Very true. Does it mean, that the Functional Graph Library has to become part of the

Re: Fractional/negative fixity?

2006-11-09 Thread Benjamin Franksen
Jón Fairbairn wrote: Syntax 1, based on Phil Wadler's improvement of my old proposal. The precedence relation is a preorder.[...] infix {ops_1; ops_2; ...; ops_n} The alternative syntax is exemplified thus: infix L + - (L * / (R ^)) [...] I think both ways (I like the second one

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 comparing

Re: Fractional/negative fixity?

2006-11-08 Thread apfelmus
Lennart Augustsson wrote: On Nov 7, 2006, at 11:47 , [EMAIL PROTECTED] wrote: 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 [...] I think that computable real

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 -- what

[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 will guess

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 integers to

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

2006-11-08 Thread Joachim Durchholz
Bulat Ziganshin schrieb: 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

Re: Fractional/negative fixity?

2006-11-08 Thread Jón Fairbairn
Simon Marlow [EMAIL PROTECTED] writes: 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

Re: Fractional/negative fixity?

2006-11-08 Thread Jan-Willem Maessen
On Nov 7, 2006, at 5:49 PM, Robert Dockins wrote: [On operator precedence] Ha! Well, as long as we're being pedantic, surely we wouldn't need any set larger than the rationals (which does have a decidable ordering)? Also, since I'm commenting anyway, I rather like the idea of specifying

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 be solved by the

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

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 page

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 to the end of

Re: Fractional/negative fixity?

2006-11-07 Thread apfelmus
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 to the end of that

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

Re: Fractional/negative fixity?

2006-11-07 Thread Lennart Augustsson
On Nov 7, 2006, at 11:47 , [EMAIL PROTECTED] wrote: 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/

Re: Fractional/negative fixity?

2006-11-07 Thread Robert Dockins
On Tuesday 07 November 2006 17:32, Lennart Augustsson wrote: On Nov 7, 2006, at 11:47 , [EMAIL PROTECTED] wrote: 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

Re: Fractional/negative fixity?

2006-11-07 Thread Dan Weston
I started this e-mail thread on HaskellCafe instead of HaskellPrime because it was minimal, backwards-compatible, valid Haskell 98 (or very nearly so) and could go (now) into GHC if someone saw fit to put it in. If you think C++ is not overly complicated, just what is a protected abstract

Re: Fractional/negative fixity?

2006-11-07 Thread Claus Reinke
by all means, lets have warm fuzzy precedence declarations infix(nearly right) (exp (2*i*pi) + 1) :-) infix(mostly left) (((\x-cos x + i*(sin x)) (2*pi)) + 1) (-: who says that all the fun has to start in the type system?-) we would probably need to refer to hyperreals, in order to

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:

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`