Re: Integers to Ints

2001-05-16 Thread Fergus Henderson
On 16-May-2001, Steinitz, Dominic J <[EMAIL PROTECTED]> wrote: > Can someone explain the following behaviour? Or is it a bug in hugs? It looks to me very much like it is a bug in Hugs. ghc 4.04 does not suffer from this bug. It's easy to make mistakes like this, which can often arise from forge

Re: Integers to Ints

2001-05-16 Thread Rijk-Jan van Haaften
Hello, >Can someone explain the following behaviour? Or is it a bug in hugs? I can not explain it. Rather strange is that even this is allowed: (fromIntegral (toInteger (minBound::Int) + 1) -1) :: Int yielding -2147483648 > > (fromIntegral(toInteger(minBound::Int))::Int) > >Program error: {prim

Integers to Ints

2001-05-16 Thread Steinitz, Dominic J
Can someone explain the following behaviour? Or is it a bug in hugs? X690v5> (fromIntegral(toInteger(minBound::Int))::Int) Program error: {primIntegerToInt (-2147483648)} (15 reductions, 70 cells) X690v5> (fromIntegral(toInteger((minBound::Int)+1))::Int) -2147483647 (21 reductions, 29 cells) X