section 3.10 of Haskell has the passage
"Where the type is also an instance of class Bounded and e3 is omitted,
an implied e3 is added of maxBound (if the increment is positive)
or minBound (resp. negative)."

Int is an instance of Bounded but...

take 10 $ enumFrom $ (maxBound::Int)

or

take 10 $ enumFrom $ [maxBound::Int ..]

give:

[2147483647,-2147483648,-2147483647,-2147483646,-2147483645,-2147483644,-2147483643,-2147483642,-2147483641,-2147483640]

instead of

[2147483647]

Stefan Kahrs


Reply via email to