[Haskell-cafe] Why does Enum succ and pred functions throw exception

ok at cs.otago.ac.nz ok at cs.otago.ac.nz
Sat Jun 23 01:35:14 CEST 2012

> An ordering does not typically induce a computable enumeration.  For
> example, there are infinitely many rationals between any pair of
> rationals.

I didn't say it was odd that Ords weren't Enums,
I said that it's odd that Enums aren't Ords.

It makes little or no sense to make treat rationals as Enums;
the intent of enums is generally to provide *exhaustive*
enumeration of a *discrete* set.

More information about the Haskell-Cafe mailing list