For example, with prelude v1.0.0-rc.3:
> let x = negate (bottom :: Int)
> x
2147483648
> x > top :: Int
true
I think this is because negate is being inlined without a | 0 for Int values. For example:
module Main where
import Prelude
main = negate (bottom :: Int) > top
produces
var main = -Data_Bounded.bottom(Data_Bounded.boundedInt) > Data_Bounded.top(Data_Bounded.boundedInt);
Adding a bitwise-or with 0 would mean that we would get negate bottom == bottom :: Int instead, which is a bit weird, but at least means that Int is actually a 32-bit integer.
For example, with prelude v1.0.0-rc.3:
I think this is because
negateis being inlined without a| 0forIntvalues. For example:produces
Adding a bitwise-or with 0 would mean that we would get
negate bottom == bottom :: Intinstead, which is a bit weird, but at least means thatIntis actually a 32-bit integer.