Remove Enum from Float and Double

Tillmann Rendel rendel at informatik.uni-marburg.de
Tue Jun 11 23:48:16 CEST 2013


Hi,

> The primary motivation for removing these instances is that they cause
> endless confusion for beginners [...]

Not sure what that means for this discussion, but enumFromTo is already 
confusing without considering floating point numbers:

> Prelude> [fromInteger 1, fromInteger 3 .. fromInteger 4] :: [Rational]
> [1 % 1,3 % 1,5 % 1]
> Prelude> map fromInteger [1, 3 .. 4] :: [Rational]
> [1 % 1,3 % 1]

In general, I would be against removing features just because they are 
confusing for beginners. I don't think that's a good design principle 
for a language that is primarily targeted at professional programmers 
and computer scientists.

   Tillmann



More information about the Haskell-prime mailing list