You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Foldable instance for IntMap (fixes#579) (#593)
* Fix Foldable instance for IntMap.
As reported in #579 the Foldable
instance for IntMap is unlawful and internally inconsistent. This was caused as
a result of the internal representation used by IntMap.
More specifically, `fold`, `foldMap`, and `traverse` (via `traverseWithKey`)
always placed positively keyed entries before negative keyed ones. To fix this
we need to check to see if the mask is positive or negative.
Tested by adding new property tests, verifying they failed with the
implementation at HEAD, and then passed after the changes.
0 commit comments