Skip to content

Commit a4e8d16

Browse files
authored
Make IntSet splitMember strict in the key (#983)
Currently, the key is ignored for an empty set.
1 parent 68e24da commit a4e8d16

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

containers/changelog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
### Breaking changes
66

77
* `Data.IntMap.Lazy.split`, `Data.IntMap.Strict.split`,
8-
`Data.IntMap.Lazy.splitLookup` and `Data.IntMap.Strict.splitLookup` are now
9-
strict in the key. Previously, the key was ignored for an empty map.
10-
(Soumik Sarkar)
8+
`Data.IntMap.Lazy.splitLookup`, `Data.IntMap.Strict.splitLookup` and
9+
`Data.IntSet.splitMember` are now strict in the key. Previously, the key was
10+
ignored for an empty map or set. (Soumik Sarkar)
1111

1212
## 0.7
1313

containers/src/Data/IntSet/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ splitMember x t =
936936
in (lt, fnd, gt')
937937
_ -> go x t
938938
where
939-
go x' t'@(Bin p m l r)
939+
go !x' t'@(Bin p m l r)
940940
| nomatch x' p m = if x' < p then (Nil, False, t') else (t', False, Nil)
941941
| zero x' m =
942942
case go x' l of

0 commit comments

Comments
 (0)