Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-binary-orphans for 
openSUSE:Factory checked in at 2022-10-13 15:44:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-binary-orphans (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-binary-orphans.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-binary-orphans"

Thu Oct 13 15:44:03 2022 rev:4 rq:1009702 version:1.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-binary-orphans/ghc-binary-orphans.changes    
2022-02-11 23:10:31.847140553 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-binary-orphans.new.2275/ghc-binary-orphans.changes
  2022-10-13 15:44:34.071021684 +0200
@@ -1,0 +2,8 @@
+Thu Aug 11 15:11:32 UTC 2022 - Peter Simons <[email protected]>
+
+- Update binary-orphans to version 1.0.3.
+  # 1.0.3
+
+  - Add `ByteArray` (from `Data.Array.Byte` instance)
+
+-------------------------------------------------------------------

Old:
----
  binary-orphans-1.0.2.tar.gz
  binary-orphans.cabal

New:
----
  binary-orphans-1.0.3.tar.gz

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

Other differences:
------------------
++++++ ghc-binary-orphans.spec ++++++
--- /var/tmp/diff_new_pack.bL6gGP/_old  2022-10-13 15:44:34.847023199 +0200
+++ /var/tmp/diff_new_pack.bL6gGP/_new  2022-10-13 15:44:34.851023208 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-binary-orphans
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,13 +19,12 @@
 %global pkg_name binary-orphans
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.0.2
+Version:        1.0.3
 Release:        0
 Summary:        Compatibility package for binary; provides instances
 License:        BSD-3-Clause
 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/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-OneTuple-devel
 BuildRequires:  ghc-binary-devel
@@ -60,7 +59,6 @@
 
 %prep
 %autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ binary-orphans-1.0.2.tar.gz -> binary-orphans-1.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/binary-orphans-1.0.2/CHANGELOG.md 
new/binary-orphans-1.0.3/CHANGELOG.md
--- old/binary-orphans-1.0.2/CHANGELOG.md       2001-09-09 03:46:40.000000000 
+0200
+++ new/binary-orphans-1.0.3/CHANGELOG.md       2001-09-09 03:46:40.000000000 
+0200
@@ -1,3 +1,7 @@
+# 1.0.3
+
+- Add `ByteArray` (from `Data.Array.Byte` instance)
+
 # 1.0.2
 
 - Add `Solo` instance
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/binary-orphans-1.0.2/binary-orphans.cabal 
new/binary-orphans-1.0.3/binary-orphans.cabal
--- old/binary-orphans-1.0.2/binary-orphans.cabal       2001-09-09 
03:46:40.000000000 +0200
+++ new/binary-orphans-1.0.3/binary-orphans.cabal       2001-09-09 
03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:      1.12
 name:               binary-orphans
-version:            1.0.2
+version:            1.0.3
 synopsis:           Compatibility package for binary; provides instances
 category:           Data, Binary, Parsing, Compatibility
 description:
@@ -25,8 +25,9 @@
    || ==8.6.5
    || ==8.8.4
    || ==8.10.4
-   || ==9.0.1
-   || ==9.2.1
+   || ==9.0.2
+   || ==9.2.4
+   || ==9.4.1
 
 extra-source-files: CHANGELOG.md
 
@@ -37,10 +38,11 @@
 library
   default-language: Haskell2010
   hs-source-dirs:   src
+  ghc-options:      -Wall
   exposed-modules:  Data.Binary.Orphans
   other-extensions: CPP
   build-depends:
-      base          >=4.5     && <4.17
+      base          >=4.5     && <4.18
     , binary        >=0.5.1.0 && <0.6 || >=0.7.1.0 && <0.8 || >=0.8.3.0 && 
<0.8.10
     , transformers  >=0.3.0.0 && <0.7
 
@@ -50,7 +52,7 @@
 
   if !impl(ghc >=8.0)
     build-depends: fail >=4.9 && <4.10
-    build-depends: semigroups >=0.18.5 && <0.19.2
+    build-depends: semigroups >=0.18.5 && <0.20.1
 
   if !impl(ghc >=9.2)
     build-depends: OneTuple >=0.3 && <0.4
@@ -67,7 +69,7 @@
     , binary-orphans
     , OneTuple              >=0.3      && <0.4
     , QuickCheck            >=2.13.1   && <2.15
-    , quickcheck-instances  >=0.3.21   && <0.4
+    , quickcheck-instances  >=0.3.28   && <0.4
     , tagged                >=0.8.6    && <0.8.7
     , tasty                 >=0.10.1.2 && <1.5
     , tasty-quickcheck      >=0.8.3.2  && <0.11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/binary-orphans-1.0.2/src/Data/Binary/Orphans.hs 
new/binary-orphans-1.0.3/src/Data/Binary/Orphans.hs
--- old/binary-orphans-1.0.2/src/Data/Binary/Orphans.hs 2001-09-09 
03:46:40.000000000 +0200
+++ new/binary-orphans-1.0.3/src/Data/Binary/Orphans.hs 2001-09-09 
03:46:40.000000000 +0200
@@ -1,7 +1,9 @@
 {-# LANGUAGE CPP                 #-}
 {-# LANGUAGE FlexibleContexts    #-}
 {-# LANGUAGE FlexibleInstances   #-}
+{-# LANGUAGE MagicHash           #-}
 {-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE UnboxedTuples       #-}
 #if __GLASGOW_HASKELL__ >= 706
 {-# LANGUAGE PolyKinds           #-}
 #endif
@@ -12,7 +14,8 @@
 import Data.Binary.Put
 
 import           Control.Applicative   (Alternative (..))
-import           Control.Monad         (MonadPlus (..), liftM, liftM2)
+import           Control.Monad
+                 (MonadPlus (..), liftM, liftM2, replicateM)
 import qualified Control.Monad.Fail    as Fail
 import           Data.Bits             (Bits, shiftL, shiftR, (.|.))
 import           Data.Complex          (Complex (..))
@@ -34,6 +37,15 @@
 import Data.Tuple.Solo (Solo (..))
 #endif
 
+#if MIN_VERSION_base(4,17,0)
+import Data.Array.Byte (ByteArray (..), MutableByteArray (..))
+import GHC.Exts
+       (Int (..), indexWord8Array#, newByteArray#, sizeofByteArray#,
+       unsafeFreezeByteArray#, writeWord8Array#)
+import GHC.ST          (ST (..), runST)
+import GHC.Word        (Word8 (..))
+#endif
+
 -------------------------------------------------------------------------------
 -- binary-0.7.1.0
 -------------------------------------------------------------------------------
@@ -337,3 +349,58 @@
 instance Binary a => Binary (Solo a) where
   put (Solo x) = put x
   get = fmap Solo get
+
+#if MIN_VERSION_base(4,17,0)
+instance Binary ByteArray where
+  put ba = put maxI >> go 0
+    where
+      maxI :: Int
+      maxI = sizeofByteArray ba
+
+      go :: Int -> Put
+      go i | i < maxI  = put (indexByteArray ba i) >> go (i + 1)
+           | otherwise = return ()
+
+  get = do
+    len <- get
+    xs  <- replicateM len get
+    return (byteArrayFromListN len xs)
+
+{-# INLINE sizeofByteArray #-}
+sizeofByteArray :: ByteArray -> Int
+sizeofByteArray (ByteArray ba) = I# (sizeofByteArray# ba)
+
+{-# INLINE indexByteArray #-}
+indexByteArray :: ByteArray -> Int -> Word8
+indexByteArray (ByteArray ba) (I# i) = W8# (indexWord8Array# ba i)
+
+{-# INLINE byteArrayFromListN #-}
+byteArrayFromListN :: Int -> [Word8] -> ByteArray
+byteArrayFromListN len xs = runST $ do
+    mba <- newByteArray len
+    go mba 0 xs
+    unsafeFreezeByteArray mba
+  where
+    go :: MutableByteArray s -> Int -> [Word8] -> ST s ()
+    go mba i ys
+        | i < len = case ys of
+            []   -> writeWord8Array mba i 0 >> go mba (i + 1) ys
+            z:zs -> writeWord8Array mba i z >> go mba (i + 1) zs
+
+        | otherwise = return ()
+
+{-# INLINE newByteArray #-}
+newByteArray :: Int -> ST s (MutableByteArray s)
+newByteArray (I# len) = ST $ \s -> case newByteArray# len s of
+    (# s', mba #) -> (# s', MutableByteArray mba #)
+
+{-# INLINE unsafeFreezeByteArray #-}
+unsafeFreezeByteArray :: MutableByteArray s -> ST s ByteArray
+unsafeFreezeByteArray (MutableByteArray mba) = ST $ \s -> case 
unsafeFreezeByteArray# mba s of
+    (# s', ba #) -> (# s', ByteArray ba #)
+
+{-# INLINE writeWord8Array #-}
+writeWord8Array :: MutableByteArray s -> Int -> Word8 -> ST s ()
+writeWord8Array (MutableByteArray mba) (I# i) (W8# w) = ST $ \s -> case 
writeWord8Array# mba i w s of
+    s' -> (# s', () #)
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/binary-orphans-1.0.2/test/Tests.hs 
new/binary-orphans-1.0.3/test/Tests.hs
--- old/binary-orphans-1.0.2/test/Tests.hs      2001-09-09 03:46:40.000000000 
+0200
+++ new/binary-orphans-1.0.3/test/Tests.hs      2001-09-09 03:46:40.000000000 
+0200
@@ -13,6 +13,10 @@
 import Test.Tasty                (TestTree, defaultMain, testGroup)
 import Test.Tasty.QuickCheck     (testProperty)
 
+#if MIN_VERSION_base(4,17,0)
+import Data.Array.Byte (ByteArray)
+#endif
+
 main :: IO ()
 main = defaultMain tests
 
@@ -22,6 +26,9 @@
   , testProperty "Sum Int"         $ roundtrip (Proxy :: Proxy (Sum Int))
   , testProperty "Min Int"         $ roundtrip (Proxy :: Proxy (Min Int))
   , testProperty "Solo Int"        $ roundtrip (Proxy :: Proxy (Solo Int))
+#if MIN_VERSION_base(4,17,0)
+  , testProperty "ByteArray"       $ roundtrip (Proxy :: Proxy ByteArray)
+#endif
   ]
 
 roundtrip :: (Eq a, Show a, Binary a) => Proxy a -> a -> Property

Reply via email to