Skip to content

Commit

Permalink
Prepare release 0.2.14.0 (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjakobi authored May 21, 2021
1 parent 7855c42 commit 6588174
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [0.2.14.0]

* [Add `HashMap.mapKeys`.](https://github.com/haskell-unordered-containers/unordered-containers/pull/308) Thanks, Marco Perone!

* [Add instances for `NFData1` and `NFData2`.](https://github.com/haskell-unordered-containers/unordered-containers/pull/314) Thanks, Isaac Elliott and Oleg Grenrus!

* [Fix `@since`-annotation for `compose`.](https://github.com/haskell-unordered-containers/unordered-containers/pull/303) Thanks, @Mathnerd314!

[0.2.14.0]: https://github.com/haskell-unordered-containers/unordered-containers/compare/v0.2.13.0...v0.2.14.0

## [0.2.13.0]

* [Add `HashMap.compose`.](https://github.com/haskell-unordered-containers/unordered-containers/pull/299) Thanks Alexandre Esteves.
Expand Down
6 changes: 6 additions & 0 deletions Data/HashMap/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ instance (NFData k, NFData v) => NFData (Leaf k v) where
rnf (L k v) = rnf k `seq` rnf v

#if MIN_VERSION_deepseq(1,4,3)
-- | @since 0.2.14.0
instance NFData k => NF.NFData1 (Leaf k) where
liftRnf rnf2 = NF.liftRnf2 rnf rnf2

-- | @since 0.2.14.0
instance NF.NFData2 Leaf where
liftRnf2 rnf1 rnf2 (L k v) = rnf1 k `seq` rnf2 v
#endif
Expand Down Expand Up @@ -236,9 +238,11 @@ instance (NFData k, NFData v) => NFData (HashMap k v) where
rnf (Collision _ ary) = rnf ary

#if MIN_VERSION_deepseq(1,4,3)
-- | @since 0.2.14.0
instance NFData k => NF.NFData1 (HashMap k) where
liftRnf rnf2 = NF.liftRnf2 rnf rnf2

-- | @since 0.2.14.0
instance NF.NFData2 HashMap where
liftRnf2 _ _ Empty = ()
liftRnf2 rnf1 rnf2 (BitmapIndexed _ ary) = NF.liftRnf (NF.liftRnf2 rnf1 rnf2) ary
Expand Down Expand Up @@ -1789,6 +1793,8 @@ traverseWithKey f = go
-- fromList [(1,"c")]
-- >>> mapKeys (\ _ -> 3) (fromList [(1,"b"), (2,"a"), (3,"d"), (4,"c")])
-- fromList [(3,"c")]
--
-- @since 0.2.14.0
mapKeys :: (Eq k2, Hashable k2) => (k1 -> k2) -> HashMap k1 v -> HashMap k2 v
mapKeys f = fromList . foldrWithKey (\k x xs -> (f k, x) : xs) []

Expand Down
1 change: 1 addition & 0 deletions Data/HashMap/Internal/Array.hs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ rnfArray ary0 = go ary0 n0 0
{-# INLINE rnfArray #-}

#if MIN_VERSION_deepseq(1,4,3)
-- | @since 0.2.14.0
instance NF.NFData1 Array where
liftRnf = liftRnfArray

Expand Down
1 change: 1 addition & 0 deletions Data/HashSet/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ instance (NFData a) => NFData (HashSet a) where
{-# INLINE rnf #-}

#if MIN_VERSION_deepseq(1,4,3)
-- | @since 0.2.14.0
instance NF.NFData1 HashSet where
liftRnf rnf1 = NF.liftRnf2 rnf1 rnf . asMap
#endif
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.13.0
version: 0.2.14.0
synopsis: Efficient hashing-based container types
description:
Efficient hashing-based container types. The containers have been
Expand Down

0 comments on commit 6588174

Please sign in to comment.