Hello community,

here is the log from the commit of package ghc-hashable for openSUSE:Factory 
checked in at 2018-05-30 12:08:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-hashable (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-hashable.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-hashable"

Wed May 30 12:08:29 2018 rev:15 rq:607807 version:1.2.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-hashable/ghc-hashable.changes        
2017-09-15 21:47:02.081762233 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-hashable.new/ghc-hashable.changes   
2018-05-30 12:25:50.253276034 +0200
@@ -1,0 +2,14 @@
+Mon May 14 17:02:11 UTC 2018 - [email protected]
+
+- Update hashable to version 1.2.7.0.
+
+ * Add `Hashable` and `Hashable1` instances for `Complex`
+
+ * Fix undefined behavior in `hashable_fn_hash()` implementation
+   due to signed integer overflow (#152)
+
+ * Mark `Data.Hashable.Lifted` as `Trustworthy` (re SafeHaskell)
+
+ * Support GHC 8.4
+
+-------------------------------------------------------------------

Old:
----
  hashable-1.2.6.1.tar.gz
  hashable.cabal

New:
----
  hashable-1.2.7.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-hashable.spec ++++++
--- /var/tmp/diff_new_pack.WOfhHZ/_old  2018-05-30 12:25:51.309240877 +0200
+++ /var/tmp/diff_new_pack.WOfhHZ/_new  2018-05-30 12:25:51.313240743 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-hashable
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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,14 +19,13 @@
 %global pkg_name hashable
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.2.6.1
+Version:        1.2.7.0
 Release:        0
 Summary:        A class for types that can be converted to a hash value
 License:        BSD-3-Clause
 Group:          Development/Libraries/Haskell
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-deepseq-devel
@@ -61,7 +60,6 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ifarch i586
@@ -82,9 +80,9 @@
 %ghc_pkg_recache
 
 %files -f %{name}.files
-%doc LICENSE
+%license LICENSE
 
 %files devel -f %{name}-devel.files
-%doc CHANGES.md README.md examples
+%doc CHANGES.md README.md
 
 %changelog

++++++ hashable-1.2.6.1.tar.gz -> hashable-1.2.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hashable-1.2.6.1/CHANGES.md 
new/hashable-1.2.7.0/CHANGES.md
--- old/hashable-1.2.6.1/CHANGES.md     2017-06-22 06:07:04.000000000 +0200
+++ new/hashable-1.2.7.0/CHANGES.md     2018-03-07 23:02:09.000000000 +0100
@@ -1,3 +1,14 @@
+## Version 1.2.7.0
+
+ * Add `Hashable` and `Hashable1` instances for `Complex`
+
+ * Fix undefined behavior in `hashable_fn_hash()` implementation
+   due to signed integer overflow (#152)
+
+ * Mark `Data.Hashable.Lifted` as `Trustworthy` (re SafeHaskell)
+
+ * Support GHC 8.4
+
 ## Version 1.2.6.1
 
  * Use typeRepFingerprint from Type.Reflection.Unsafe
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hashable-1.2.6.1/Data/Hashable/Class.hs 
new/hashable-1.2.7.0/Data/Hashable/Class.hs
--- old/hashable-1.2.6.1/Data/Hashable/Class.hs 2017-06-22 06:07:04.000000000 
+0200
+++ new/hashable-1.2.7.0/Data/Hashable/Class.hs 2018-03-07 23:02:09.000000000 
+0100
@@ -70,6 +70,7 @@
 import qualified Data.ByteString as B
 import qualified Data.ByteString.Lazy as BL
 import qualified Data.ByteString.Unsafe as B
+import Data.Complex (Complex(..))
 import Data.Int (Int8, Int16, Int32, Int64)
 import Data.List (foldl')
 import Data.Ratio (Ratio, denominator, numerator)
@@ -439,6 +440,14 @@
         inBounds x = x >= fromIntegral (minBound :: Int) && x <= maxInt
 #endif
 
+instance Hashable a => Hashable (Complex a) where
+    {-# SPECIALIZE instance Hashable (Complex Double) #-}
+    {-# SPECIALIZE instance Hashable (Complex Float)  #-}
+    hash (r :+ i) = hash r `hashWithSalt` i
+    hashWithSalt = hashWithSalt1
+instance Hashable1 Complex where
+    liftHashWithSalt h s (r :+ i) = s `h` r `h` i
+
 #if MIN_VERSION_base(4,9,0)
 -- Starting with base-4.9, numerator/denominator don't need 'Integral' anymore
 instance Hashable a => Hashable (Ratio a) where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hashable-1.2.6.1/Data/Hashable/Generic.hs 
new/hashable-1.2.7.0/Data/Hashable/Generic.hs
--- old/hashable-1.2.6.1/Data/Hashable/Generic.hs       2017-06-22 
06:07:04.000000000 +0200
+++ new/hashable-1.2.7.0/Data/Hashable/Generic.hs       2018-03-07 
23:02:09.000000000 +0100
@@ -18,7 +18,6 @@
     (
     ) where
 
-import Data.Bits (shiftR)
 import Data.Hashable.Class
 import GHC.Generics
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hashable-1.2.6.1/Data/Hashable/Lifted.hs 
new/hashable-1.2.7.0/Data/Hashable/Lifted.hs
--- old/hashable-1.2.6.1/Data/Hashable/Lifted.hs        2017-06-22 
06:07:04.000000000 +0200
+++ new/hashable-1.2.7.0/Data/Hashable/Lifted.hs        2018-03-07 
23:02:09.000000000 +0100
@@ -1,6 +1,11 @@
+{-# LANGUAGE CPP #-}
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
+
 ------------------------------------------------------------------------
 -- |
--- Module      :  Data.Hashable.Class
+-- Module      :  Data.Hashable.Lifted
 -- Copyright   :  (c) Milan Straka 2010
 --                (c) Johan Tibell 2011
 --                (c) Bryan O'Sullivan 2011, 2012
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hashable-1.2.6.1/cbits/fnv.c 
new/hashable-1.2.7.0/cbits/fnv.c
--- old/hashable-1.2.6.1/cbits/fnv.c    2017-06-22 06:07:04.000000000 +0200
+++ new/hashable-1.2.7.0/cbits/fnv.c    2018-03-07 23:02:09.000000000 +0100
@@ -36,8 +36,9 @@
  * The FNV-1 hash description: http://isthe.com/chongo/tech/comp/fnv/
  * The FNV-1 hash is public domain: 
http://isthe.com/chongo/tech/comp/fnv/#public_domain
  */
-long hashable_fnv_hash(const unsigned char* str, long len, long hash) {
+long hashable_fnv_hash(const unsigned char* str, long len, long salt) {
 
+  unsigned long hash = salt;
   while (len--) {
     hash = (hash * 16777619) ^ *str++;
   }
@@ -48,6 +49,6 @@
 /* Used for ByteArray#s. We can't treat them like pointers in
    native Haskell, but we can in unsafe FFI calls.
  */
-long hashable_fnv_hash_offset(const unsigned char* str, long offset, long len, 
long hash) {
-  return hashable_fnv_hash(str + offset, len, hash);
+long hashable_fnv_hash_offset(const unsigned char* str, long offset, long len, 
long salt) {
+  return hashable_fnv_hash(str + offset, len, salt);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hashable-1.2.6.1/hashable.cabal 
new/hashable-1.2.7.0/hashable.cabal
--- old/hashable-1.2.6.1/hashable.cabal 2017-06-22 06:07:04.000000000 +0200
+++ new/hashable-1.2.7.0/hashable.cabal 2018-03-07 23:02:09.000000000 +0100
@@ -1,5 +1,6 @@
+Cabal-version:       1.12
 Name:                hashable
-Version:             1.2.6.1
+Version:             1.2.7.0
 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
@@ -16,9 +17,10 @@
 Stability:           Provisional
 Category:            Data
 Build-type:          Simple
-Cabal-version:       >=1.8
 -- tests/Properties.hs shouldn't have to go here, but the source files
 -- for the test-suite stanzas don't get picked up by `cabal sdist`.
+tested-with:         GHC==8.4.1, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, 
GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2
+
 Extra-source-files:
   CHANGES.md, README.md, tests/Properties.hs,
   benchmarks/Benchmarks.hs, benchmarks/cbits/*.c, benchmarks/cbits/*.h
@@ -46,9 +48,9 @@
   Exposed-modules:   Data.Hashable
                      Data.Hashable.Lifted
   Other-modules:     Data.Hashable.Class
-  Build-depends:     base >= 4.4 && < 4.11,
+  Build-depends:     base >= 4.4 && < 4.12,
                      bytestring >= 0.9 && < 0.11,
-                     deepseq >= 1.3
+                     deepseq >= 1.3 && < 1.5
   if impl(ghc)
     Build-depends:   ghc-prim,
                      text >= 0.11.0.5
@@ -71,6 +73,8 @@
     if os(windows)
       extra-libraries: advapi32
 
+  Default-Language:  Haskell2010
+
 Test-suite tests
   Type:              exitcode-stdio-1.0
   Hs-source-dirs:    tests
@@ -96,6 +100,8 @@
   if impl(ghc >= 7.2.1)
     CPP-Options:     -DGENERICS
 
+  Default-Language:  Haskell2010
+
 benchmark benchmarks
   -- We cannot depend on the hashable library directly as that creates
   -- a dependency cycle.
@@ -157,6 +163,7 @@
     if os(windows)
       extra-libraries: advapi32
 
+  Default-Language:  Haskell2010
 
 Executable hashable-examples
   if flag(examples)
@@ -165,6 +172,7 @@
     buildable: False
   hs-source-dirs: examples
   main-is: Main.hs
+  Default-Language:  Haskell2010
 
 source-repository head
   type:     git


Reply via email to