Skip to content

Commit 46080fa

Browse files
authored
Tweak union.goDifferentHash (#277)
1 parent b5758c7 commit 46080fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Data/HashMap/Internal.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ unionWithKey f = go 0
16351635
leafHashCode _ = error "leafHashCode"
16361636

16371637
goDifferentHash s h1 h2 t1 t2
1638-
| m1 == m2 = BitmapIndexed m1 (A.singleton $! go (s+bitsPerSubkey) t1 t2)
1638+
| m1 == m2 = BitmapIndexed m1 (A.singleton $! goDifferentHash (s+bitsPerSubkey) h1 h2 t1 t2)
16391639
| m1 < m2 = BitmapIndexed (m1 .|. m2) (A.pair t1 t2)
16401640
| otherwise = BitmapIndexed (m1 .|. m2) (A.pair t2 t1)
16411641
where

Data/HashMap/Internal/Strict.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ unionWithKey f = go 0
507507
leafHashCode _ = error "leafHashCode"
508508

509509
goDifferentHash s h1 h2 t1 t2
510-
| m1 == m2 = BitmapIndexed m1 (A.singleton $! go (s+bitsPerSubkey) t1 t2)
510+
| m1 == m2 = BitmapIndexed m1 (A.singleton $! goDifferentHash (s+bitsPerSubkey) h1 h2 t1 t2)
511511
| m1 < m2 = BitmapIndexed (m1 .|. m2) (A.pair t1 t2)
512512
| otherwise = BitmapIndexed (m1 .|. m2) (A.pair t2 t1)
513513
where

0 commit comments

Comments
 (0)