Skip to content

Commit fa562ab

Browse files
authored
Prepare release 0.2.12.0 (#296)
1 parent 3cc98a4 commit fa562ab

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

CHANGES.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## [0.2.12.0]
2+
3+
* Add `HashMap.isSubmapOf[By]` and `HashSet.isSubsetOf`. Thanks Sven Keidel. ([#282])
4+
5+
* Expose internal modules. ([#283])
6+
7+
* Documentation improvements in `Data.HashSet`, including a beginner-friendly
8+
introduction. Thanks Matt Renaud. ([#267])
9+
10+
* `HashMap.alterF`: Skip key deletion for absent keys. ([#288])
11+
12+
* Remove custom `unsafeShift{L,R}` definitions. ([#281])
13+
14+
* Various other documentation improvements.
15+
16+
[0.2.12.0]: https://github.com/haskell-unordered-containers/unordered-containers/compare/v0.2.11.0...v0.2.12.0
17+
[#267]: https://github.com/haskell-unordered-containers/unordered-containers/pull/267
18+
[#281]: https://github.com/haskell-unordered-containers/unordered-containers/pull/281
19+
[#282]: https://github.com/haskell-unordered-containers/unordered-containers/pull/282
20+
[#283]: https://github.com/haskell-unordered-containers/unordered-containers/pull/283
21+
[#288]: https://github.com/haskell-unordered-containers/unordered-containers/pull/288
22+
123
## 0.2.11.0
224

325
* Add `HashMap.findWithDefault` (soft-deprecates `HashMap.lookupDefault`).

Data/HashMap/Internal.hs

+4
Original file line numberDiff line numberDiff line change
@@ -1431,6 +1431,8 @@ alterFEager f !k m = (<$> f mv) $ \fres ->
14311431
--
14321432
-- >>> fromList [(1,'a'),(2,'b')] `isSubmapOf` fromList [(1,'a')]
14331433
-- False
1434+
--
1435+
-- @since 0.2.12
14341436
isSubmapOf :: (Eq k, Hashable k, Eq v) => HashMap k v -> HashMap k v -> Bool
14351437
isSubmapOf = (inline isSubmapOfBy) (==)
14361438
{-# INLINABLE isSubmapOf #-}
@@ -1449,6 +1451,8 @@ isSubmapOf = (inline isSubmapOfBy) (==)
14491451
--
14501452
-- >>> isSubmapOfBy (<=) (fromList [(1,'b')]) (fromList [(1,'a'),(2,'c')])
14511453
-- False
1454+
--
1455+
-- @since 0.2.12
14521456
isSubmapOfBy :: (Eq k, Hashable k) => (v1 -> v2 -> Bool) -> HashMap k v1 -> HashMap k v2 -> Bool
14531457
-- For maps without collisions the complexity is O(n*log m), where n is the size
14541458
-- of m1 and m the size of m2: the inclusion operation visits every leaf in m1 at least once.

Data/HashSet/Internal.hs

+2
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ keysSet m = fromMap (() <$ m)
321321
--
322322
-- >>> fromList [1,2] `isSubsetOf` fromList [1,3]
323323
-- False
324+
--
325+
-- @since 0.2.12
324326
isSubsetOf :: (Eq a, Hashable a) => HashSet a -> HashSet a -> Bool
325327
isSubsetOf s1 s2 = H.isSubmapOfBy (\_ _ -> True) (asMap s1) (asMap s2)
326328

unordered-containers.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: unordered-containers
2-
version: 0.2.11.0
2+
version: 0.2.12.0
33
synopsis: Efficient hashing-based container types
44
description:
55
Efficient hashing-based container types. The containers have been

0 commit comments

Comments
 (0)