https://bugzilla.redhat.com/show_bug.cgi?id=873385
--- Comment #5 from Jens Petersen petersen@redhat.com --- (FWIW 64bit ghci gives:
Prelude> toInteger (minBound :: Int) -9223372036854775808 )
Hugs seems to be assuming Int32, but something is indeed going wildly wrong with "toInteger (minBound::Int)".
I looked at:
src/bignums.c:326:primFun(primIntToInteger) { /* Conversion :: Int -> Integer */
but I am not familiar with hugs' internals and things seems to get into deep water quickly.
BTW "toInteger (minBound + 1:: Int) -1" and "toInteger (minBound -1:: Int) +1" seem to give the expected answer.
I almost wonder if it would be better to drop 64bit arch build for hugs.