Skip to content

Commit

Permalink
Tweak union.goDifferentHash
Browse files Browse the repository at this point in the history
  • Loading branch information
sjakobi committed Jun 22, 2020
1 parent 6b80aa8 commit 3e8a54e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Data/HashMap/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ unionWithKey f = go 0
leafHashCode _ = error "leafHashCode"

goDifferentHash s h1 h2 t1 t2
| m1 == m2 = BitmapIndexed m1 (A.singleton $! go (s+bitsPerSubkey) t1 t2)
| m1 == m2 = BitmapIndexed m1 (A.singleton $! goDifferentHash (s+bitsPerSubkey) h1 h2 t1 t2)
| m1 < m2 = BitmapIndexed (m1 .|. m2) (A.pair t1 t2)
| otherwise = BitmapIndexed (m1 .|. m2) (A.pair t2 t1)
where
Expand Down
2 changes: 1 addition & 1 deletion Data/HashMap/Strict/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ unionWithKey f = go 0
leafHashCode _ = error "leafHashCode"

goDifferentHash s h1 h2 t1 t2
| m1 == m2 = BitmapIndexed m1 (A.singleton $! go (s+bitsPerSubkey) t1 t2)
| m1 == m2 = BitmapIndexed m1 (A.singleton $! goDifferentHash (s+bitsPerSubkey) h1 h2 t1 t2)
| m1 < m2 = BitmapIndexed (m1 .|. m2) (A.pair t1 t2)
| otherwise = BitmapIndexed (m1 .|. m2) (A.pair t2 t1)
where
Expand Down

0 comments on commit 3e8a54e

Please sign in to comment.