Re: numericEnumFromThenTo strangeness

2000-07-11 Thread Tony Davie
William Lee Irwin III wrote: > > The rationals may be enumerated according to the construction given by > Cantor, or by various other means. Cantor's construction was to arrange > pairs of natural numbers (i,j) in a big 2-D array, strike out the entries > with gcd(i,j) /= 1, and then traverse t

Re: numericEnumFromThenTo strangeness

2000-07-11 Thread William Lee Irwin III
William Lee Irwin III writes: >> [...] >> The rationals may be enumerated according to the construction given >> by Cantor, or by various other means. On Tue, Jul 11, 2000 at 12:15:24PM +1200, Tom Pledger wrote: > There was a related discussion last year, starting from this point in > the archive

Re: numericEnumFromThenTo strangeness

2000-07-10 Thread Marcin 'Qrczak' Kowalczyk
Mon, 10 Jul 2000 09:26:19 -0700, Simon Peyton-Jones <[EMAIL PROTECTED]> pisze: > Bottom line: I don't like it either, but I don't think it's a typo. > Feel free to suggest a typo-level of improvement! It's not typo-level, but maybe the right way for future is to decouple sequences created by [fo

RE: numericEnumFromThenTo strangeness

2000-07-10 Thread Simon Peyton-Jones
[Haskell 98 editor hat on] Michael said: > I'm slightly puzzled about the definition of list enumerations in > GHC (and possibly other Haskell implementations)... > > ``[0.0, 2 .. 9] :: [Float]'' > ==> [0.0, 2.0, 4.0, 6.0, 8.0, 10.0] Lennart Augustsson wrote: | > By definition, if you fo

RE: numericEnumFromThenTo strangeness

2000-07-10 Thread Simon Peyton-Jones
| I remind you that there is still an uncorrected bug in the domain of | rationals (at least in Hugs, but I believe that also elsewhere, since | this is a plain Haskell bug in the Prelude). | | succ (3%2) | | gives 2%1. | | [3%2 .. something] | | gives [1%1, 2%1, ... etc.] This one is fixed

Re: numericEnumFromThenTo strangeness

2000-07-10 Thread William Lee Irwin III
Jerzy Karczmarczuk wrote: > [snip] >> I remind you that there is still an uncorrected bug in the domain of >> rationals (at least in Hugs, but I believe that also elsewhere, since >> this is a plain Haskell bug in the Prelude). >> >> succ (3%2) >> >> gives 2%1. On Mon, Jul 10, 2000 at 11:34:18A

Re: numericEnumFromThenTo strangeness

2000-07-10 Thread Koen Claessen
Jerzy Karczmarczuk wrote: | My permanent, constant suggestion: revise all the | numeric classes very thoroughly. Beginning at the | beginning. Amen to that! The numeric classes are a constant frustration when one just wants some plain numbers in a program. There is however so much more stuff

Re: numericEnumFromThenTo strangeness

2000-07-10 Thread George Russell
Jerzy Karczmarczuk wrote: [snip] > I remind you that there is still an uncorrected bug in the domain of > rationals (at least in Hugs, but I believe that also elsewhere, since > this is a plain Haskell bug in the Prelude). > > succ (3%2) > > gives 2%1. Yes, this is also loony. succ should eithe

Re: numericEnumFromThenTo strangeness

2000-07-10 Thread Jerzy Karczmarczuk
George Russell wrote: > > Lennart Augustsson wrote: > > By definition, if you follow the standard you can't be wrong. :) > > But the standard can be wrong. Perhaps this is a typo in the report? > I think I looked at this a while back. The standard is kaput. It gets even > worse if you try to m

Re: numericEnumFromThenTo strangeness

2000-07-07 Thread George Russell
Lennart Augustsson wrote: > By definition, if you follow the standard you can't be wrong. :) > But the standard can be wrong. Perhaps this is a typo in the report? I think I looked at this a while back. The standard is kaput. It gets even worse if you try to make sense of the definitions of suc

Re: numericEnumFromThenTo strangeness

2000-07-07 Thread Lennart Augustsson
[EMAIL PROTECTED] wrote: > Michael Weber writes (on the ghc-users list): > > I'm slightly puzzled about the definition of list enumerations in > > GHC (and possibly other Haskell implementations)... > > > > ``[0.0, 2 .. 9] :: [Float]'' > > ==> [0.0, 2.0, 4.0, 6.0, 8.0, 10.0] > > > > Never

Re: numericEnumFromThenTo strangeness

2000-07-07 Thread malcolm-ghc
Michael Weber writes (on the ghc-users list): > I'm slightly puzzled about the definition of list enumerations in > GHC (and possibly other Haskell implementations)... > > ``[0.0, 2 .. 9] :: [Float]'' > ==> [0.0, 2.0, 4.0, 6.0, 8.0, 10.0] > > Nevertheless, this behaviour is defined by the