packages feed

nonempty-containers 0.3.0.0 → 0.3.1.0

raw patch · 3 files changed

+26/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Map.NonEmpty: absurdNEMap :: NEMap Void a -> b

Files

CHANGELOG.md view
@@ -1,6 +1,17 @@ Changelog ========= +Version 0.3.1.0+---------------++*June 13, 2019*++<https://github.com/mstksg/nonempty-containers/releases/tag/v0.3.1.0>++*   Add `absurdNEMap` to *Data.Map.NonEmpty*.  This is the only type that would+    benefit from such a specialized function, whereas all other types would do+    just as well with `absurd . fold1 :: Foldable1 f => f Void -> a`.+ Version 0.3.0.0 --------------- 
nonempty-containers.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 87d86a711cd539b74db2c65e4aad0b063f44dcafe10649bef05ae1b731f9ea36+-- hash: ba935c3c5707ed9ae691a7496155c303f8b100b1fb53ed3ada7af6de3a68b61d  name:           nonempty-containers-version:        0.3.0.0+version:        0.3.1.0 synopsis:       Non-empty variants of containers data types, with full API description:    Efficient and optimized non-empty versions of types from /containers/.                 Inspired by /non-empty-containers/ library, except attempting a more
src/Data/Map/NonEmpty.hs view
@@ -122,6 +122,7 @@   , lookupGT   , lookupLE   , lookupGE+  , absurdNEMap    -- ** Size   , size@@ -264,6 +265,7 @@ import           Data.Set                   (Set) import           Data.Set.NonEmpty.Internal (NESet(..)) import           Data.These+import           Data.Void import           Prelude hiding             (lookup, foldr1, foldl1, foldr, foldl, filter, map, take, drop, splitAt) import qualified Data.Foldable              as F import qualified Data.List.NonEmpty         as NE@@ -2336,6 +2338,17 @@                             . M.maxViewWithKey                             $ m {-# INLINE deleteFindMax #-}++-- | Special property of non-empty maps: The type of non-empty maps over+-- uninhabited keys is itself uninhabited.+--+-- This property also exists for /values/ inside a non-empty container+-- (like for 'NESet', 'NESeq', and 'NEIntMap'); this can be witnessed using+-- the function @'absurd' . 'fold1'@.+--+-- @since 0.3.1.0+absurdNEMap :: NEMap Void a -> b+absurdNEMap (NEMap k _ _) = absurd k  -- --------------------------- -- Combining functions