Re: [Haskell-cafe] instance Enum Double considered not entirelygreat?

2011-09-26 Thread Donn Cave
Quoth Richard O'Keefe o...@cs.otago.ac.nz, [ ... re Why would you write an upper bound of 0.3 on a list if you don't expect that to be included in the result? ] Because upper bounds are *UPPER BOUNDS* and are NOT as a rule included in the result. If you write [0,2..9] you - DO

Re: [Haskell-cafe] instance Enum Double considered not entirelygreat?

2011-09-26 Thread Chris Smith
On Mon, 2011-09-26 at 19:54 -0700, Donn Cave wrote: Pardon the questions from the gallery, but ... I can sure see that 0.3 shouldn't be included in the result by overshooting the limit (i.e., 0.30004), and the above expectations about [0,2..9] are obvious enough, but now I have to

Re: [Haskell-cafe] instance Enum Double considered not entirelygreat?

2011-09-26 Thread Richard O'Keefe
On 27/09/2011, at 3:54 PM, Donn Cave wrote: Quoth Richard O'Keefe o...@cs.otago.ac.nz, [ ... re Why would you write an upper bound of 0.3 on a list if you don't expect that to be included in the result? ] Because upper bounds are *UPPER BOUNDS* and are NOT as a rule included in

Re: [Haskell-cafe] instance Enum Double considered not entirelygreat?

2011-09-26 Thread Richard O'Keefe
On 27/09/2011, at 4:55 PM, Chris Smith wrote: So there are two perspectives here. One is that we should think in terms of exact values of the type Float, which means we'd want to exclude it, because it's larger than the top end of the range. The other is that we should think of approximate

Re: [Haskell-cafe] instance Enum Double considered not entirelygreat?

2011-09-20 Thread Donn Cave
Quoth Chris Smith cdsm...@gmail.com, ... As for Enum, if someone were to want a type class to represent an enumeration of all the values of a type, then such a thing is reasonable to want. Maybe you can even reasonably wish it were called Enum. But it would be the *wrong* thing to use as a