Skip to content

Commit 94811cb

Browse files
authored
Prepare release 0.2.21 (#575)
1 parent d3d9a72 commit 94811cb

File tree

5 files changed

+44
-3
lines changed

5 files changed

+44
-3
lines changed

CHANGES.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
## [0.2.21] - December 2025
2+
3+
* API enhancements:
4+
* [Add `HashMap.lookupKey` and `HashSet.lookupElement`](https://github.com/haskell-unordered-containers/unordered-containers/pull/554)
5+
* [Add `differenceWithKey`](https://github.com/haskell-unordered-containers/unordered-containers/pull/542)
6+
* [Add `disjoint`](https://github.com/haskell-unordered-containers/unordered-containers/pull/559)
7+
8+
* Performance improvements:
9+
* [`HashSet.fromList`: Use `unsafeInsert`](https://github.com/haskell-unordered-containers/unordered-containers/pull/515)
10+
* [Use tree-diffing for `difference`](https://github.com/haskell-unordered-containers/unordered-containers/pull/535)
11+
* [Remove some unnecessary forcing of HashMaps](https://github.com/haskell-unordered-containers/unordered-containers/pull/545)
12+
* [Remove the `Array.index` function](https://github.com/haskell-unordered-containers/unordered-containers/pull/539)
13+
* [`hashWithSalt`: Ensure that the salt `Int` is unboxed](https://github.com/haskell-unordered-containers/unordered-containers/pull/569)
14+
15+
* Documentation changes:
16+
* [Turn some comments into docstrings](https://github.com/haskell-unordered-containers/unordered-containers/pull/516)
17+
* [Reword disclaimer regarding hash collision attacks](https://github.com/haskell-unordered-containers/unordered-containers/pull/557)
18+
* [Update time complexity of some HashSet functions](https://github.com/haskell-unordered-containers/unordered-containers/pull/568)
19+
* [Update instructions for code inspection](https://github.com/haskell-unordered-containers/unordered-containers/pull/567)
20+
21+
* Other changes:
22+
* [Drop support for GHC < 8.10](https://github.com/haskell-unordered-containers/unordered-containers/pull/510)
23+
* [Address deprecation warnings and other warnings](https://github.com/haskell-unordered-containers/unordered-containers/pull/512)
24+
* [Optimize indexing in arrays of length 2](https://github.com/haskell-unordered-containers/unordered-containers/pull/528)
25+
* [Introduce `ShiftedHash`](https://github.com/haskell-unordered-containers/unordered-containers/pull/529)
26+
* [New "fine-grained" benchmarks](https://github.com/haskell-unordered-containers/unordered-containers/pull/526)
27+
* [Make it compile with MicroHs](https://github.com/haskell-unordered-containers/unordered-containers/pull/553). Thanks, @augustss!
28+
* [Remove redundant `Eq` constraints](https://github.com/haskell-unordered-containers/unordered-containers/pull/558)
29+
* [Refactor `delete`](https://github.com/haskell-unordered-containers/unordered-containers/pull/571)
30+
* [`difference[With]`: Undo constraint relaxation](https://github.com/haskell-unordered-containers/unordered-containers/pull/573)
31+
32+
[0.2.21]: https://github.com/haskell-unordered-containers/unordered-containers/compare/v0.2.20.1...v0.2.21
33+
134
## [0.2.20.1] - October 2025
235

336
* [Fix infinite loop in `isSubmapOf[By]` / `isSubsetOf` on 32-bit platforms](https://github.com/haskell-unordered-containers/unordered-containers/pull/501).

Data/HashMap/Internal.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,8 @@ infixl 9 !
790790
-- if present, otherwise return 'Nothing'.
791791
--
792792
-- This function can be used for /interning/, i.e. to reduce memory usage.
793+
--
794+
-- @since 0.2.21
793795
lookupKey :: Hashable k => k -> HashMap k v -> Maybe k
794796
lookupKey k = \m -> fromMaybe# (lookupKeyInSubtree# 0 (hash k) k m)
795797
where
@@ -1972,6 +1974,8 @@ differenceWith f = differenceWithKey (const f)
19721974
-- encountered, the combining function is applied to the values of these keys.
19731975
-- If it returns 'Nothing', the element is discarded (proper set difference). If
19741976
-- it returns (@'Just' y@), the element is updated with a new value @y@.
1977+
--
1978+
-- @since 0.2.21
19751979
differenceWithKey :: Eq k => (k -> v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v
19761980
differenceWithKey f = go_differenceWithKey 0
19771981
where
@@ -2323,7 +2327,7 @@ searchSwap mary n toFind start = go start toFind start
23232327
-- xs ``disjoint`` ys = null (xs ``intersection`` ys)
23242328
-- @
23252329
--
2326-
-- @since FIXME
2330+
-- @since 0.2.21
23272331
disjoint :: Eq k => HashMap k a -> HashMap k b -> Bool
23282332
disjoint = disjointSubtrees 0
23292333
{-# INLINE disjoint #-}

Data/HashMap/Internal/Strict.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,8 @@ differenceWith f = HM.differenceWithKey $
632632
-- encountered, the combining function is applied to the values of these keys.
633633
-- If it returns 'Nothing', the element is discarded (proper set difference). If
634634
-- it returns (@'Just' y@), the element is updated with a new value @y@.
635+
--
636+
-- @since 0.2.21
635637
differenceWithKey :: Eq k => (k -> v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v
636638
differenceWithKey f = HM.differenceWithKey $
637639
\k vA vB -> case f k vA vB of

Data/HashSet/Internal.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ member a s = case H.lookup a (asMap s) of
356356
-- present, otherwise return 'Nothing'.
357357
--
358358
-- This is useful for /interning/, i.e. to reduce memory usage.
359+
--
360+
-- @since 0.2.21
359361
lookupElement :: Hashable a => a -> HashSet a -> Maybe a
360362
lookupElement a = H.lookupKey a . asMap
361363
{-# INLINE lookupElement #-}
@@ -412,7 +414,7 @@ intersection (HashSet a) (HashSet b) = HashSet (H.intersection a b)
412414
-- xs ``disjoint`` ys = null (xs ``intersection`` ys)
413415
-- @
414416
--
415-
-- @since FIXME
417+
-- @since 0.2.21
416418
disjoint :: Eq k => HashSet k -> HashSet k -> Bool
417419
disjoint (HashSet a) (HashSet b) = H.disjoint a b
418420
{-# INLINE disjoint #-}

unordered-containers.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: unordered-containers
2-
version: 0.2.20.1
2+
version: 0.2.21
33
synopsis: Efficient hashing-based container types
44
description:
55
Efficient hashing-based container types. The containers have been

0 commit comments

Comments
 (0)