packages feed

Unique 0.4.2 → 0.4.3

raw patch · 4 files changed

+21/−41 lines, 4 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

Data/List/Unique.hs view
@@ -23,16 +23,11 @@    where  -import Data.List-   (-     sort-   , sortBy-   , group-   )+import           Data.List           (group, sort, sortBy) -import Data.List.Extra (nubOrd)-import Data.Function (on)-import Control.Applicative (liftA2)+import           Control.Applicative (liftA2)+import           Data.Function       (on)+import           Data.List.Extra     (nubOrd)  -- | 'sortUniq' sorts the list and removes the duplicates of elements. Example: --@@ -84,7 +79,12 @@ -- > count_ "foo bar" == [(' ',1),('a',1),('b',1),('f',1),('r',1),('o',2)]  count_ :: Ord a => [a] -> [(a, Int)]-count_ = sortBy (compare `on` snd) . map lh . sg+count_ = sortBy (compare `on` snd) . count++-- | 'occurrences' finds all elements of each occurrences.++-- occurrences :: Ord a => [a] -> [(1,a)]+-- occurrences =  -- | 'countElem' gets the number of occurrences of the specified element. Example: --
Data/List/UniqueStrict.hs view
@@ -21,22 +21,12 @@         , count_ )         where -import qualified Data.Map.Strict as MS-    (-      Map-    , fromListWith-    , toList-    , filter-    , keys-    )+import qualified Data.Map.Strict    as MS (Map, filter, fromListWith, keys,+                                           toList) -import qualified Data.IntMap.Strict as IM-    (-      fromListWith-    , toList-    )+import qualified Data.IntMap.Strict as IM (fromListWith, toList) -import qualified Data.List as L (sort)+import qualified Data.List          as L (sort)  countMap :: Ord a => [a] -> MS.Map a Int countMap = MS.fromListWith (+) . flip zip (repeat 1)
Data/List/UniqueUnsorted.hs view
@@ -23,21 +23,11 @@         )         where -import Data.Hashable-import qualified Data.HashMap.Strict as HS-    (-      HashMap-    , fromListWith-    , toList-    , filter-    , keys-    )+import           Data.Hashable+import qualified Data.HashMap.Strict as HS (HashMap, filter, fromListWith, keys,+                                            toList) -import qualified Data.IntMap.Strict as IM-    (-      fromListWith-    , toList-    )+import qualified Data.IntMap.Strict  as IM (fromListWith, toList)   countMap :: (Hashable a, Eq a) => [a] -> HS.HashMap a Int
Unique.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.4.2+version:             0.4.3  -- A short (one-line) description of the package. synopsis:           It provides the functionality like unix "uniq" utility@@ -59,7 +59,7 @@   -- other-extensions:    -- Other library packages from which modules are imported.-  build-depends:         base >=4.0 && <= 4.8+  build-depends:         base >=4.0 && < 5                        , extra                        , containers                        , hashable@@ -69,4 +69,4 @@    -- Base language which the package is written in.   default-language:    Haskell2010-  ghc-options:         -O2 -Wall -fspec-constr-count=8 -funbox-strict-fields+  ghc-options:         -Wall