Hello community, here is the log from the commit of package ghc-unordered-containers for openSUSE:Factory checked in at 2015-05-21 08:13:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-unordered-containers (Old) and /work/SRC/openSUSE:Factory/.ghc-unordered-containers.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-unordered-containers" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-unordered-containers/ghc-unordered-containers.changes 2014-11-26 20:55:19.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-unordered-containers.new/ghc-unordered-containers.changes 2015-05-21 08:13:21.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Apr 14 08:20:00 UTC 2015 - mimi...@gmail.com + +- update to 0.2.5.1 +* no changelog + +------------------------------------------------------------------- Old: ---- unordered-containers-0.2.4.0.tar.gz New: ---- unordered-containers-0.2.5.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-unordered-containers.spec ++++++ --- /var/tmp/diff_new_pack.iNuTii/_old 2015-05-21 08:13:21.000000000 +0200 +++ /var/tmp/diff_new_pack.iNuTii/_new 2015-05-21 08:13:21.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-unordered-containers # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %global pkg_name unordered-containers Name: ghc-unordered-containers -Version: 0.2.4.0 +Version: 0.2.5.1 Release: 0 Summary: Efficient hashing-based container types License: BSD-3-Clause ++++++ unordered-containers-0.2.4.0.tar.gz -> unordered-containers-0.2.5.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unordered-containers-0.2.4.0/Data/HashMap/Array.hs new/unordered-containers-0.2.5.1/Data/HashMap/Array.hs --- old/unordered-containers-0.2.4.0/Data/HashMap/Array.hs 2014-04-12 12:40:40.000000000 +0200 +++ new/unordered-containers-0.2.5.1/Data/HashMap/Array.hs 2014-10-11 15:04:46.000000000 +0200 @@ -49,7 +49,9 @@ ) where import qualified Data.Traversable as Traversable +#if __GLASGOW_HASKELL__ < 709 import Control.Applicative (Applicative) +#endif import Control.DeepSeq import Control.Monad.ST hiding (runST) -- GHC 7.7 exports toList/fromList from GHC.Exts @@ -59,7 +61,12 @@ indexArray#, unsafeFreezeArray#, unsafeThawArray#, MutableArray#) import GHC.ST (ST(..)) + +#if __GLASGOW_HASKELL__ >= 709 +import Prelude hiding (filter, foldr, length, map, read, traverse) +#else import Prelude hiding (filter, foldr, length, map, read) +#endif #if __GLASGOW_HASKELL__ >= 702 import GHC.Exts (sizeofArray#, copyArray#, thawArray#, sizeofMutableArray#, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unordered-containers-0.2.4.0/Data/HashMap/Base.hs new/unordered-containers-0.2.5.1/Data/HashMap/Base.hs --- old/unordered-containers-0.2.4.0/Data/HashMap/Base.hs 2014-04-12 12:40:40.000000000 +0200 +++ new/unordered-containers-0.2.5.1/Data/HashMap/Base.hs 2014-10-11 15:04:46.000000000 +0200 @@ -1,4 +1,8 @@ {-# LANGUAGE BangPatterns, CPP, DeriveDataTypeable, MagicHash #-} +{-# LANGUAGE ScopedTypeVariables #-} +#if __GLASGOW_HASKELL__ >= 708 +{-# LANGUAGE TypeFamilies #-} +#endif {-# OPTIONS_GHC -fno-full-laziness -funbox-strict-fields #-} module Data.HashMap.Base @@ -77,18 +81,23 @@ , updateOrConcatWith ) where +#if __GLASGOW_HASKELL__ >= 709 +import Data.Functor ((<$>)) +#else import Control.Applicative ((<$>), Applicative(pure)) +import Data.Monoid (Monoid(mempty, mappend)) +import Data.Traversable (Traversable(..)) +import Data.Word (Word) +#endif import Control.DeepSeq (NFData(rnf)) import Control.Monad.ST (ST) import Data.Bits ((.&.), (.|.), complement) import Data.Data hiding (Typeable) import qualified Data.Foldable as Foldable import qualified Data.List as L -import Data.Monoid (Monoid(mempty, mappend)) -import Data.Traversable (Traversable(..)) -import Data.Word (Word) import GHC.Exts ((==#), build, reallyUnsafePtrEquality#) import Prelude hiding (filter, foldr, lookup, map, null, pred) +import Text.Read hiding (step) import qualified Data.HashMap.Array as A import qualified Data.Hashable as H @@ -101,6 +110,9 @@ #if __GLASGOW_HASKELL__ >= 707 import GHC.Exts (isTrue#) #endif +#if __GLASGOW_HASKELL__ >= 708 +import qualified GHC.Exts as Exts +#endif ------------------------------------------------------------------------ @@ -166,8 +178,17 @@ type Bitmap = Word type Shift = Int +instance (Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) where + readPrec = parens $ prec 10 $ do + Ident "fromList" <- lexP + xs <- readPrec + return (fromList xs) + + readListPrec = readListPrecDefault + instance (Show k, Show v) => Show (HashMap k v) where - show m = "fromList " ++ show (toList m) + showsPrec d m = showParen (d > 10) $ + showString "fromList " . shows (toList m) instance Traversable (HashMap k) where traverse f = traverseWithKey (const f) @@ -433,11 +454,14 @@ {-# INLINABLE insertWith #-} -- | In-place update version of insertWith -unsafeInsertWith :: (Eq k, Hashable k) => (v -> v -> v) -> k -> v -> HashMap k v +unsafeInsertWith :: forall k v. (Eq k, Hashable k) + => (v -> v -> v) -> k -> v -> HashMap k v -> HashMap k v unsafeInsertWith f k0 v0 m0 = runST (go h0 k0 v0 0 m0) where h0 = hash k0 + go :: (Eq k, Hashable k) => Hash -> k -> v -> Shift -> HashMap k v + -> ST s (HashMap k v) go !h !k x !_ Empty = return $! Leaf h (L k x) go h k x s (Leaf hy l@(L ky y)) | hy == h = if ky == k @@ -813,7 +837,7 @@ -- | /O(n)/ Filter this map by retaining only elements satisfying a -- predicate. -filterWithKey :: (k -> v -> Bool) -> HashMap k v -> HashMap k v +filterWithKey :: forall k v. (k -> v -> Bool) -> HashMap k v -> HashMap k v filterWithKey pred = go where go Empty = Empty @@ -830,6 +854,9 @@ mary <- A.new_ n step ary0 mary b0 0 0 1 n where + step :: A.Array (HashMap k v) -> A.MArray s (HashMap k v) + -> Bitmap -> Int -> Int -> Bitmap -> Int + -> ST s (HashMap k v) step !ary !mary !b i !j !bi n | i >= n = case j of 0 -> return Empty @@ -856,6 +883,9 @@ mary <- A.new_ n step ary0 mary 0 0 n where + step :: A.Array (Leaf k v) -> A.MArray s (Leaf k v) + -> Int -> Int -> Int + -> ST s (HashMap k v) step !ary !mary i !j n | i >= n = case j of 0 -> return Empty @@ -1085,3 +1115,12 @@ ptrEq x y = isTrue# (reallyUnsafePtrEquality# x y ==# 1#) #endif {-# INLINE ptrEq #-} + +#if __GLASGOW_HASKELL__ >= 708 +------------------------------------------------------------------------ +-- IsList instance +instance (Eq k, Hashable k) => Exts.IsList (HashMap k v) where + type Item (HashMap k v) = (k, v) + fromList = fromList + toList = toList +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unordered-containers-0.2.4.0/Data/HashSet.hs new/unordered-containers-0.2.5.1/Data/HashSet.hs --- old/unordered-containers-0.2.4.0/Data/HashSet.hs 2014-04-12 12:40:40.000000000 +0200 +++ new/unordered-containers-0.2.5.1/Data/HashSet.hs 2014-10-11 15:04:46.000000000 +0200 @@ -1,4 +1,7 @@ {-# LANGUAGE CPP, DeriveDataTypeable #-} +#if __GLASGOW_HASKELL__ >= 708 +{-# LANGUAGE TypeFamilies #-} +#endif ------------------------------------------------------------------------ -- | @@ -63,13 +66,20 @@ import Data.Data hiding (Typeable) import Data.HashMap.Base (HashMap, foldrWithKey) import Data.Hashable (Hashable) +#if __GLASGOW_HASKELL__ < 709 import Data.Monoid (Monoid(..)) +#endif import GHC.Exts (build) import Prelude hiding (filter, foldr, map, null) import qualified Data.Foldable as Foldable import qualified Data.HashMap.Lazy as H import qualified Data.List as List import Data.Typeable (Typeable) +import Text.Read + +#if __GLASGOW_HASKELL__ >= 708 +import qualified GHC.Exts as Exts +#endif -- | A set of values. A set cannot contain duplicate values. newtype HashSet a = HashSet { @@ -96,6 +106,14 @@ mappend = union {-# INLINE mappend #-} +instance (Eq a, Hashable a, Read a) => Read (HashSet a) where + readPrec = parens $ prec 10 $ do + Ident "fromList" <- lexP + xs <- readPrec + return (fromList xs) + + readListPrec = readListPrecDefault + instance (Show a) => Show (HashSet a) where showsPrec d m = showParen (d > 10) $ showString "fromList " . shows (toList m) @@ -221,3 +239,10 @@ fromList :: (Eq a, Hashable a) => [a] -> HashSet a fromList = HashSet . List.foldl' (\ m k -> H.insert k () m) H.empty {-# INLINE fromList #-} + +#if __GLASGOW_HASKELL__ >= 708 +instance (Eq a, Hashable a) => Exts.IsList (HashSet a) where + type Item (HashSet a) = a + fromList = fromList + toList = toList +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unordered-containers-0.2.4.0/tests/HashMapProperties.hs new/unordered-containers-0.2.5.1/tests/HashMapProperties.hs --- old/unordered-containers-0.2.4.0/tests/HashMapProperties.hs 2014-04-12 12:40:40.000000000 +0200 +++ new/unordered-containers-0.2.5.1/tests/HashMapProperties.hs 2014-10-11 15:04:46.000000000 +0200 @@ -21,7 +21,7 @@ -- Key type that generates more hash collisions. newtype Key = K { unK :: Int } - deriving (Arbitrary, Eq, Ord, Show) + deriving (Arbitrary, Eq, Ord, Read, Show) instance Hashable Key where hashWithSalt salt k = hashWithSalt salt (unK k) `mod` 20 @@ -38,6 +38,9 @@ pNeq :: [(Key, Int)] -> [(Key, Int)] -> Bool pNeq xs = (M.fromList xs /=) `eq` (HM.fromList xs /=) +pReadShow :: [(Key, Int)] -> Bool +pReadShow xs = M.fromList xs == read (show (M.fromList xs)) + pFunctor :: [(Key, Int)] -> Bool pFunctor = fmap (+ 1) `eq_` fmap (+ 1) @@ -192,6 +195,7 @@ testGroup "instances" [ testProperty "==" pEq , testProperty "/=" pNeq + , testProperty "Read/Show" pReadShow , testProperty "Functor" pFunctor , testProperty "Foldable" pFoldable ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unordered-containers-0.2.4.0/tests/HashSetProperties.hs new/unordered-containers-0.2.5.1/tests/HashSetProperties.hs --- old/unordered-containers-0.2.4.0/tests/HashSetProperties.hs 2014-04-12 12:40:40.000000000 +0200 +++ new/unordered-containers-0.2.5.1/tests/HashSetProperties.hs 2014-10-11 15:04:46.000000000 +0200 @@ -16,7 +16,7 @@ -- Key type that generates more hash collisions. newtype Key = K { unK :: Int } - deriving (Arbitrary, Enum, Eq, Integral, Num, Ord, Show, Real) + deriving (Arbitrary, Enum, Eq, Integral, Num, Ord, Read, Show, Real) instance Hashable Key where hashWithSalt salt k = hashWithSalt salt (unK k) `mod` 20 @@ -33,6 +33,9 @@ pNeq :: [Key] -> [Key] -> Bool pNeq xs = (Set.fromList xs /=) `eq` (S.fromList xs /=) +pReadShow :: [Key] -> Bool +pReadShow xs = Set.fromList xs == read (show (Set.fromList xs)) + pFoldable :: [Int] -> Bool pFoldable = (L.sort . Foldable.foldr (:) []) `eq` (L.sort . Foldable.foldr (:) []) @@ -111,6 +114,7 @@ testGroup "instances" [ testProperty "==" pEq , testProperty "/=" pNeq + , testProperty "Read/Show" pReadShow , testProperty "Foldable" pFoldable ] -- Basic interface diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unordered-containers-0.2.4.0/unordered-containers.cabal new/unordered-containers-0.2.5.1/unordered-containers.cabal --- old/unordered-containers-0.2.4.0/unordered-containers.cabal 2014-04-12 12:40:41.000000000 +0200 +++ new/unordered-containers-0.2.5.1/unordered-containers.cabal 2014-10-11 15:04:46.000000000 +0200 @@ -1,5 +1,5 @@ name: unordered-containers -version: 0.2.4.0 +version: 0.2.5.1 synopsis: Efficient hashing-based container types description: Efficient hashing-based container types. The containers have been