Hello community, here is the log from the commit of package ghc-hashable for openSUSE:Factory checked in at 2015-05-21 08:11:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-hashable (Old) and /work/SRC/openSUSE:Factory/.ghc-hashable.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hashable" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-hashable/ghc-hashable.changes 2014-11-26 20:54:47.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-hashable.new/ghc-hashable.changes 2015-05-21 08:11:29.000000000 +0200 @@ -1,0 +2,13 @@ +Sun Apr 12 18:40:00 UTC 2015 - [email protected] + +- update to 1.2.3.2 ++ disable SSE2 on i586 arch +* Add support for GHC 7.10 typeRepFingerprint +* Added support for random 1.1.*. +* Silence integer literal overflow warning +* Add support for GHC 7.10 `integer-gmp2` & `Natural` +* Add instance for Data.Void +* Make the SSE .cabal flags manual +* Add an upper bound on bytestring + +------------------------------------------------------------------- Old: ---- hashable-1.2.2.0.tar.gz New: ---- hashable-1.2.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-hashable.spec ++++++ --- /var/tmp/diff_new_pack.7PQpRZ/_old 2015-05-21 08:11:30.000000000 +0200 +++ /var/tmp/diff_new_pack.7PQpRZ/_new 2015-05-21 08:11:30.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-hashable # -# 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 hashable Name: ghc-hashable -Version: 1.2.2.0 +Version: 1.2.3.2 Release: 0 Summary: A class for types that can be converted to a hash value License: BSD-3-Clause @@ -60,6 +60,9 @@ %setup -q -n %{pkg_name}-%{version} %build +%ifarch i586 +%define cabal_configure_options -f"-sse2" +%endif %ghc_lib_build %install ++++++ hashable-1.2.2.0.tar.gz -> hashable-1.2.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.2.2.0/CHANGES.md new/hashable-1.2.3.2/CHANGES.md --- old/hashable-1.2.2.0/CHANGES.md 2014-05-13 20:55:03.000000000 +0200 +++ new/hashable-1.2.3.2/CHANGES.md 2015-03-16 07:12:09.000000000 +0100 @@ -1,3 +1,23 @@ +## Version 1.2.3.2 + + * Add support for GHC 7.10 typeRepFingerprint + +## Version 1.2.3.1 + + * Added support for random 1.1.*. + +## Version 1.2.3.0 + + * Silence integer literal overflow warning + + * Add support for GHC 7.10 `integer-gmp2` & `Natural` + + * Add instance for Data.Void + + * Make the SSE .cabal flags manual + + * Add an upper bound on bytestring + ## Version 1.2.2.0 * Add instances for `Data.ByteString.Short` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.2.2.0/Data/Hashable/Class.hs new/hashable-1.2.3.2/Data/Hashable/Class.hs --- old/hashable-1.2.2.0/Data/Hashable/Class.hs 2014-05-13 20:55:03.000000000 +0200 +++ new/hashable-1.2.3.2/Data/Hashable/Class.hs 2015-03-16 07:12:09.000000000 +0100 @@ -66,7 +66,9 @@ import GHC.Generics #endif -#if __GLASGOW_HASKELL__ >= 702 +#if __GLASGOW_HASKELL__ >= 710 +import GHC.Fingerprint.Type(Fingerprint(..)) +#elif __GLASGOW_HASKELL__ >= 702 import Data.Typeable.Internal(TypeRep(..)) import GHC.Fingerprint.Type(Fingerprint(..)) #endif @@ -90,6 +92,16 @@ #ifdef VERSION_integer_gmp import GHC.Exts (Int(..)) import GHC.Integer.GMP.Internals (Integer(..)) +# if MIN_VERSION_integer_gmp(1,0,0) +import GHC.Exts (sizeofByteArray#) +import GHC.Integer.GMP.Internals (BigNat(BN#)) +# endif +#endif + +#if MIN_VERSION_base(4,8,0) +import Data.Void (Void, absurd) +import GHC.Natural (Natural(..)) +import GHC.Exts (Word(..)) #endif #include "MachDeps.h" @@ -102,7 +114,7 @@ -- | A default salt used in the implementation of 'hash'. defaultSalt :: Int #if WORD_SIZE_IN_BITS == 64 -defaultSalt = 0xdc36d1615b7400a4 +defaultSalt = -2578643520546668380 -- 0xdc36d1615b7400a4 #else defaultSalt = 0x087fc72c #endif @@ -241,8 +253,43 @@ hash = fromEnum hashWithSalt = defaultHashWithSalt +#if defined(VERSION_integer_gmp) +# if MIN_VERSION_integer_gmp(1,0,0) +instance Hashable BigNat where + hashWithSalt salt (BN# ba) = hashByteArrayWithSalt ba 0 numBytes salt + `hashWithSalt` size + where + size = numBytes `quot` SIZEOF_HSWORD + numBytes = I# (sizeofByteArray# ba) +# endif +#endif + +#if MIN_VERSION_base(4,8,0) +instance Hashable Natural where +# if MIN_VERSION_integer_gmp(1,0,0) + hash (NatS# n) = hash (W# n) + hash (NatJ# bn) = hash bn + + hashWithSalt salt (NatS# n) = hashWithSalt salt (W# n) + hashWithSalt salt (NatJ# bn) = hashWithSalt salt bn +# else + hash (Natural n) = hash n + + hashWithSalt salt (Natural n) = hashWithSalt salt n +# endif +#endif + instance Hashable Integer where #if defined(VERSION_integer_gmp) +# if MIN_VERSION_integer_gmp(1,0,0) + hash (S# n) = (I# n) + hash (Jp# bn) = hash bn + hash (Jn# bn) = negate (hash bn) + + hashWithSalt salt (S# n) = hashWithSalt salt (I# n) + hashWithSalt salt (Jp# bn) = hashWithSalt salt bn + hashWithSalt salt (Jn# bn) = negate (hashWithSalt salt bn) +# else hash (S# int) = I# int hash n@(J# size# byteArray) | n >= minInt && n <= maxInt = fromInteger n :: Int @@ -262,6 +309,7 @@ `hashWithSalt` size where minInt = fromIntegral (minBound :: Int) maxInt = fromIntegral (maxBound :: Int) +# endif #else hashWithSalt salt = foldl' hashWithSalt salt . go where @@ -405,7 +453,10 @@ -- | Compute the hash of a TypeRep, in various GHC versions we can do this quickly. hashTypeRep :: TypeRep -> Int {-# INLINE hashTypeRep #-} -#if __GLASGOW_HASKELL__ >= 702 +#if __GLASGOW_HASKELL__ >= 710 +-- Fingerprint is just the MD5, so taking any Int from it is fine +hashTypeRep tr = let Fingerprint x _ = typeRepFingerprint tr in fromIntegral x +#elif __GLASGOW_HASKELL__ >= 702 -- Fingerprint is just the MD5, so taking any Int from it is fine hashTypeRep (TypeRep (Fingerprint x _) _ _) = fromIntegral x #elif __GLASGOW_HASKELL__ >= 606 @@ -419,6 +470,11 @@ hashWithSalt = defaultHashWithSalt {-# INLINE hash #-} +#if MIN_VERSION_base(4,8,0) +instance Hashable Void where + hashWithSalt _ = absurd +#endif + -- | Compute a hash value for the content of this pointer. hashPtr :: Ptr a -- ^ pointer to the data to hash -> Int -- ^ length, in bytes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.2.2.0/hashable.cabal new/hashable-1.2.3.2/hashable.cabal --- old/hashable-1.2.2.0/hashable.cabal 2014-05-13 20:55:03.000000000 +0200 +++ new/hashable-1.2.3.2/hashable.cabal 2015-03-16 07:12:09.000000000 +0100 @@ -1,5 +1,5 @@ Name: hashable -Version: 1.2.2.0 +Version: 1.2.3.2 Synopsis: A class for types that can be converted to a hash value Description: This package defines a class, 'Hashable', for types that can be converted to a hash value. This class @@ -29,16 +29,18 @@ Flag sse2 Description: Do we want to assume that a target supports SSE 2? Default: True + Manual: True Flag sse41 Description: Do we want to assume that a target supports SSE 4.1? Default: False + Manual: True Library Exposed-modules: Data.Hashable Other-modules: Data.Hashable.Class - Build-depends: base >= 4.0 && < 5.0, - bytestring >= 0.9 + Build-depends: base >= 4.0 && < 4.9, + bytestring >= 0.9 && < 0.11 if impl(ghc) Build-depends: ghc-prim, text >= 0.11.0.5 @@ -75,7 +77,7 @@ test-framework-quickcheck2 >= 0.2.9, HUnit, QuickCheck >= 2.4.0.1, - random == 1.0.*, + random >= 1.0 && < 1.2, text >= 0.11.0.5 if !os(windows) Build-depends: unix
