Quick bug: formatIntegral is broken when given minBound for whatever integral type. This is because for integer types like Int8, with a range (minBound,maxBound) = (-127,128), the abs of its minBound doesn't fit in the type. The actual result abs (-127 :: Int8) gives is -127. Thus this breaks formatIntegral which calls showInt which requires a non-negative input.
Bug is hereish:
|
splitSign :: (Num b, Ord b) => b -> (Sign, b) |
In base, show @Int8 first marshals the input with fromIntegral :: Int8 -> Int. For Int, they special case minBound.
Quick bug:
formatIntegralis broken when givenminBoundfor whatever integral type. This is because for integer types likeInt8, with a range(minBound,maxBound) = (-127,128), the abs of its minBound doesn't fit in the type. The actual resultabs (-127 :: Int8)gives is-127. Thus this breaksformatIntegralwhich callsshowIntwhich requires a non-negative input.Bug is hereish:
PyF/src/PyF/Formatters.hs
Line 167 in f94d02e
In
base,show @Int8first marshals the input withfromIntegral :: Int8 -> Int. ForInt, they special caseminBound.