Enum Int problem

Bo Ilic Bo.Ilic at businessobjects.com
Fri Aug 13 14:39:51 EDT 2004


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





More information about the Glasgow-haskell-bugs mailing list