[Haskell-cafe] instance Enum Double considered not entirely great?
alex.solla at gmail.com
Tue Sep 20 22:40:46 CEST 2011
On Tue, Sep 20, 2011 at 1:22 PM, Jake McArthur <jake.mcarthur at gmail.com>wrote:
> On Tue, Sep 20, 2011 at 3:48 PM, Chris Smith <cdsmith at gmail.com> wrote:
> > But it would be the *wrong* thing to use as a desugaring for list range
> > notation. List ranges are very unlikely to be useful or even meaningful
> > for most such enumerations (what is [ Red, Green .. LightPurple]?); and
> > conversely, as we've seen in this thread, list ranges *are* useful in
> > situations where they are not a suitable way of enumerating all values
> > of a type.
> This makes me wonder if maybe the reason this discussion is happening
> at all is that we don't have a well-defined meaning for what Enum
Enum is the class that represents enumerable types. In other words, the
class of things that can be injected into the natural numbers. These types
inherit an order from the natural numbers, ordering by images under this
Now, we might not like that order, and it might not agree with an Ord
instance, but it exists.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe