
I'm implementing Enum for a type I have, and I figured it should replicate what ordinary Enum types, so I did some tests on how Enum behaves. I noticed that: "enumFromThenTo 3 3 5" is not the same as "enumFromThenTo 3 3 1". This seems bizarre to me. Generally increasing the stepsize increases the length of the list. For example, "length (enumFromThenTo 0 10 1000) == 101" "length (enumFromThenTo 0 2 1000) == 501" "length (enumFromThenTo 0 1 1000) == 1001" "length (enumFromThenTo 0 0 1000) == infinite" but "length (enumFromThenTo 0 (-10) (-1000)) == 101" "length (enumFromThenTo 0 (-2) (-1000)) == 501" "length (enumFromThenTo 0 (-1) (-1000)) == 1001" "length (enumFromThenTo 0 0 1000) == 0" It would seem to me that "enumFromThenTo x y z == map negate (enumFromThenTo (-x) (-y) (-z))" should be an invariant that should hold but in this case it clearly doesn't. Is this intentional, and if so, for what reason? Or is this a GHC bug?