We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fe4337 commit 50e2490Copy full SHA for 50e2490
Data/HashMap/Internal.hs
@@ -1357,7 +1357,9 @@ alterCollision f !h !k !ary orig =
1357
case A.index# ary (otherOfOneOrZero i) of
1358
(# l #) -> Leaf h l
1359
| otherwise -> Collision h (A.delete ary i)
1360
- Just v' -> Collision h $ A.update ary i $ L k v'
+ Just v'
1361
+ | v' `ptrEq` v -> orig
1362
+ | otherwise -> Collision h $ A.update ary i $ L k v'
1363
Nothing -> case f Nothing of
1364
Nothing -> orig
1365
Just v' -> Collision h $ A.snoc ary $ L k v'
0 commit comments