Skip to content

Commit 3e8a54e

Browse files
committed
Tweak union.goDifferentHash
1 parent 6b80aa8 commit 3e8a54e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Data/HashMap/Base.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ unionWithKey f = go 0
15001500
leafHashCode _ = error "leafHashCode"
15011501

15021502
goDifferentHash s h1 h2 t1 t2
1503-
| m1 == m2 = BitmapIndexed m1 (A.singleton $! go (s+bitsPerSubkey) t1 t2)
1503+
| m1 == m2 = BitmapIndexed m1 (A.singleton $! goDifferentHash (s+bitsPerSubkey) h1 h2 t1 t2)
15041504
| m1 < m2 = BitmapIndexed (m1 .|. m2) (A.pair t1 t2)
15051505
| otherwise = BitmapIndexed (m1 .|. m2) (A.pair t2 t1)
15061506
where

Data/HashMap/Strict/Base.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ unionWithKey f = go 0
494494
leafHashCode _ = error "leafHashCode"
495495

496496
goDifferentHash s h1 h2 t1 t2
497-
| m1 == m2 = BitmapIndexed m1 (A.singleton $! go (s+bitsPerSubkey) t1 t2)
497+
| m1 == m2 = BitmapIndexed m1 (A.singleton $! goDifferentHash (s+bitsPerSubkey) h1 h2 t1 t2)
498498
| m1 < m2 = BitmapIndexed (m1 .|. m2) (A.pair t1 t2)
499499
| otherwise = BitmapIndexed (m1 .|. m2) (A.pair t2 t1)
500500
where

0 commit comments

Comments
 (0)