logo       

Enum Int problem: msg#00023

lang.haskell.glasgow.bugs

Subject: Enum Int problem

Using GHC 6.2.1 interpreter, the fragment [minBound :: Int, 0 ..] returns
[-2147483648].

Using Hugs, the returned value is the infinite list [-2147483648, 0,
-2147483648, 0, ...].

However, I would expect to get [-2147483648, 0]. Similar problems occur with
the other arithmetic sequence functions for Int when the increment is
greater than what is representable in the type.

Bo


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise