-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
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:
Line 167 in f94d02e
| 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels