Skip to content

Commit

Permalink
Prepare release 0.2.12.0 (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjakobi authored Aug 4, 2020
1 parent 3cc98a4 commit fa562ab
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## [0.2.12.0]

* Add `HashMap.isSubmapOf[By]` and `HashSet.isSubsetOf`. Thanks Sven Keidel. ([#282])

* Expose internal modules. ([#283])

* Documentation improvements in `Data.HashSet`, including a beginner-friendly
introduction. Thanks Matt Renaud. ([#267])

* `HashMap.alterF`: Skip key deletion for absent keys. ([#288])

* Remove custom `unsafeShift{L,R}` definitions. ([#281])

* Various other documentation improvements.

[0.2.12.0]: https://github.com/haskell-unordered-containers/unordered-containers/compare/v0.2.11.0...v0.2.12.0
[#267]: https://github.com/haskell-unordered-containers/unordered-containers/pull/267
[#281]: https://github.com/haskell-unordered-containers/unordered-containers/pull/281
[#282]: https://github.com/haskell-unordered-containers/unordered-containers/pull/282
[#283]: https://github.com/haskell-unordered-containers/unordered-containers/pull/283
[#288]: https://github.com/haskell-unordered-containers/unordered-containers/pull/288

## 0.2.11.0

* Add `HashMap.findWithDefault` (soft-deprecates `HashMap.lookupDefault`).
Expand Down
4 changes: 4 additions & 0 deletions Data/HashMap/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,8 @@ alterFEager f !k m = (<$> f mv) $ \fres ->
--
-- >>> fromList [(1,'a'),(2,'b')] `isSubmapOf` fromList [(1,'a')]
-- False
--
-- @since 0.2.12
isSubmapOf :: (Eq k, Hashable k, Eq v) => HashMap k v -> HashMap k v -> Bool
isSubmapOf = (inline isSubmapOfBy) (==)
{-# INLINABLE isSubmapOf #-}
Expand All @@ -1449,6 +1451,8 @@ isSubmapOf = (inline isSubmapOfBy) (==)
--
-- >>> isSubmapOfBy (<=) (fromList [(1,'b')]) (fromList [(1,'a'),(2,'c')])
-- False
--
-- @since 0.2.12
isSubmapOfBy :: (Eq k, Hashable k) => (v1 -> v2 -> Bool) -> HashMap k v1 -> HashMap k v2 -> Bool
-- For maps without collisions the complexity is O(n*log m), where n is the size
-- of m1 and m the size of m2: the inclusion operation visits every leaf in m1 at least once.
Expand Down
2 changes: 2 additions & 0 deletions Data/HashSet/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ keysSet m = fromMap (() <$ m)
--
-- >>> fromList [1,2] `isSubsetOf` fromList [1,3]
-- False
--
-- @since 0.2.12
isSubsetOf :: (Eq a, Hashable a) => HashSet a -> HashSet a -> Bool
isSubsetOf s1 s2 = H.isSubmapOfBy (\_ _ -> True) (asMap s1) (asMap s2)

Expand Down
2 changes: 1 addition & 1 deletion unordered-containers.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: unordered-containers
version: 0.2.11.0
version: 0.2.12.0
synopsis: Efficient hashing-based container types
description:
Efficient hashing-based container types. The containers have been
Expand Down

0 comments on commit fa562ab

Please sign in to comment.