The Enum typeclass implies that the implementing types can be ordered in some meaningful way. In Haskell, the Real type implements Enum. Coming from a mathematics background, this is very strange. A hundred years ago, Georg Cantor proved that reals cannot not be indexed, that is, there is no way to say what is the n-th real for all reals.
Now, concrete types such as Double do in fact have a finite domain. So you could argue that they can implement Enum. One would assume the the successor of a Double would be the next valid Double. Instead, it is simply the addition of 1. Hence, we see weirdness like:
Prelude> succ (1e20 :: Double) == (1e20 :: Double)
True
In my opinion, this behavior breaks the usefulness of Enum. Can anyone explain the reasoning behind this?
Edit:
Corrected Ord to Enum and clarified that reals are not aleph zero.
Post-Script: This comment illumined the answer to me:
Enum Double is nowadays considered a mistake by several Haskellers. It was added to allow e.g. [1.0 .. 20.0] to count with a step of one unit. That required succ to be (+1) instead of the true "next" double. Also, it opens a can of worms since length [1.0 .. 99.5] might be 99 or 100 depending on rounding errors. Worse, this can't be fixed, it's inherently fragile.