Remove Enum from Float and Double

Evan Laforge qdunkan at
Tue Jun 11 23:33:32 CEST 2013

On Tue, Jun 11, 2013 at 2:18 PM, Johan Tibell <johan.tibell at> wrote:
> If we truly believe that the instance is dangerous for users (and not merely
> for people who don't understand floating point arithmetic on computers),
> then we should add a deprecation pragma to the instance and discourage its
> use. But what would the deprecation message encourage instead, for users to
> write an explicit loop that tests against some lower/upper bound? It would
> have the same problem as enumFromTo.

If the problem is increasing inaccuracy, then it likely wouldn't.  E.g.:

> last [0, 0.1 .. 20]
> last (range 0 20 0.1)

More information about the Haskell-prime mailing list