Skip to content

Commit 1e8ca8c

Browse files
committed
Fix bug in deleteKeyExists
1 parent 2849a4c commit 1e8ca8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Data/HashMap/Internal.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,11 +1191,11 @@ deleteKeyExists !collPos0 !h0 !k0 !m0 = go collPos0 h0 k0 m0
11911191
in BitmapIndexed bm ary'
11921192
_ -> Full (A.update ary i st')
11931193
where i = index h 0
1194-
go collPos h _ (Collision _hy v)
1194+
go collPos h _ (Collision hy v)
11951195
| A.length v == 2
11961196
= if collPos == 0
1197-
then Leaf h (A.index v 1)
1198-
else Leaf h (A.index v 0)
1197+
then Leaf hy (A.index v 1)
1198+
else Leaf hy (A.index v 0)
11991199
| otherwise = Collision h (A.delete v collPos)
12001200
go !_ !_ !_ Empty = Empty -- error "Internal error: deleteKeyExists empty"
12011201

0 commit comments

Comments
 (0)