RE: Rational sequence

2002-10-25 Thread Simon Peyton-Jones
| > I definitely can't do that at this stage. I have never liked | > Float/Double/Ratio being in Enum, but there is no possibility of | > removing them now. A year or two ago, maybe. | | Just to clarify: Did you mean for Haskell 98 or did you mean forever? Thanks for raising that I def

RE: Rational sequence

2002-10-25 Thread Simon Peyton-Jones
| | It's inconsistent to remove the "+1/2" for numericEnumFromTo but to leave | the "+(n'-n)" for numericEnumFromThenTo. I think you probably mean to | remove both (actually, all three). | | I wouldn't recommend these changes for Float and Double (the increments | are there to account for arit

Re: Rational sequence

2002-10-24 Thread Andrew J Bromage
G'day all. On Thu, Oct 24, 2002 at 04:05:05PM +0100, Simon Peyton-Jones wrote: > I definitely can't do that at this stage. I have never liked > Float/Double/Ratio being in Enum, but there is no possibility of > removing them now. A year or two ago, maybe. Just to clarify: Did you mean for Hask

Re: Rational sequence

2002-10-24 Thread Ferenc Wagner
Dean Herington <[EMAIL PROTECTED]> writes: > It's inconsistent to remove the "+1/2" for > numericEnumFromTo but to leave the "+(n'-n)" for > numericEnumFromThenTo. I think you probably mean to > remove both (actually, all three). You are right, what I meant is numericEnumFromTo n m = takeWhile

RE: Rational sequence

2002-10-24 Thread Simon Peyton-Jones
| Since I suppose you also want to receive constructive suggestions, | I'd suggest to remove some instance definitions from the | report. I definitely can't do that at this stage. I have never liked Float/Double/Ratio being in Enum, but there is no possibility of removing them now. A year or tw

Re: Rational sequence

2002-10-24 Thread Dean Herington
Simon Peyton-Jones wrote: > Folks > > The concrete is setting fast, but Ross points out that the instance for > Enum (Ratio a) is inconsistent with that for Enum Float and Enum Double. > (It's strange that these non-integral types are in Enum, but we're stuck > with that.) > > All three use 'numer

Re: Rational sequence

2002-10-24 Thread Dean Herington
Ferenc Wagner wrote: > "Simon Peyton-Jones" <[EMAIL PROTECTED]> writes: > > > So I propose to modify the instance decl for Ratio by > > adding explicit defns for succ/pred just like those in > > Float/Double. > > I bet you guessed: once at it, what about removing those > unintuitive 1/2-s, like: >

RE: Rational sequence

2002-10-24 Thread Ch. A. Herrmann
Hi Haskellers, Simon> Any objections? frankly speaking, yes. The intellectual meaning of a successor in a non-integral type is not clear for me. Can anyone explain it? I observed this report discussion for quite a long time and maybe have found the deep reason behind the problems. It app

Re: Rational sequence

2002-10-24 Thread Ferenc Wagner
"Simon Peyton-Jones" <[EMAIL PROTECTED]> writes: > So I propose to modify the instance decl for Ratio by > adding explicit defns for succ/pred just like those in > Float/Double. I bet you guessed: once at it, what about removing those unintuitive 1/2-s, like: numericEnumFromTo n m = takeWhile (<

RE: Rational sequence

2002-10-24 Thread Simon Peyton-Jones
Folks The concrete is setting fast, but Ross points out that the instance for Enum (Ratio a) is inconsistent with that for Enum Float and Enum Double. (It's strange that these non-integral types are in Enum, but we're stuck with that.) All three use 'numericEnumFrom' etc for the enumFrom method,