Script 'mail_helper' called by obssrc
Hello community,

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

Package is "ghc-streaming-bytestring"

Thu Oct 13 15:43:05 2022 rev:8 rq:1008519 version:0.2.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-streaming-bytestring/ghc-streaming-bytestring.changes
        2022-08-01 21:32:03.913943292 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-streaming-bytestring.new.2275/ghc-streaming-bytestring.changes
      2022-10-13 15:43:17.598872401 +0200
@@ -1,0 +2,21 @@
+Fri Aug 26 05:30:23 UTC 2022 - Peter Simons <psim...@suse.com>
+
+- Update streaming-bytestring to version 0.2.4.
+  ## 0.2.4 (2022-08-26)
+
+  #### Changed
+
+  - Changed `for`'s callback to return `ByteStream m x`, to clarify that it is 
not
+    used.
+
+-------------------------------------------------------------------
+Thu Aug 18 10:11:02 UTC 2022 - Peter Simons <psim...@suse.com>
+
+- Update streaming-bytestring to version 0.2.3.
+  ## 0.2.3 (2022-08-18)
+
+  #### Added
+
+  - Add `for :: Monad m => ByteStream m r -> (P.ByteString -> ByteStream m r) 
-> ByteStream m r`
+
+-------------------------------------------------------------------

Old:
----
  streaming-bytestring-0.2.2.tar.gz

New:
----
  streaming-bytestring-0.2.4.tar.gz

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

Other differences:
------------------
++++++ ghc-streaming-bytestring.spec ++++++
--- /var/tmp/diff_new_pack.qdWsHA/_old  2022-10-13 15:43:19.966877024 +0200
+++ /var/tmp/diff_new_pack.qdWsHA/_new  2022-10-13 15:43:19.978877048 +0200
@@ -19,7 +19,7 @@
 %global pkg_name streaming-bytestring
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.2.2
+Version:        0.2.4
 Release:        0
 Summary:        Fast, effectful byte streams
 License:        BSD-3-Clause

++++++ streaming-bytestring-0.2.2.tar.gz -> streaming-bytestring-0.2.4.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/streaming-bytestring-0.2.2/CHANGELOG.md 
new/streaming-bytestring-0.2.4/CHANGELOG.md
--- old/streaming-bytestring-0.2.2/CHANGELOG.md 2022-05-18 19:50:51.000000000 
+0200
+++ new/streaming-bytestring-0.2.4/CHANGELOG.md 2022-08-26 07:27:21.000000000 
+0200
@@ -1,3 +1,16 @@
+## 0.2.4 (2022-08-26)
+
+#### Changed
+
+- Changed `for`'s callback to return `ByteStream m x`, to clarify that it is 
not
+  used.
+
+## 0.2.3 (2022-08-18)
+
+#### Added
+
+- Add `for :: Monad m => ByteStream m r -> (P.ByteString -> ByteStream m r) -> 
ByteStream m r`
+
 ## 0.2.2 (2022-05-18)
 
 #### Changed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/streaming-bytestring-0.2.2/lib/Streaming/ByteString.hs 
new/streaming-bytestring-0.2.4/lib/Streaming/ByteString.hs
--- old/streaming-bytestring-0.2.2/lib/Streaming/ByteString.hs  2021-06-23 
21:03:45.000000000 +0200
+++ new/streaming-bytestring-0.2.4/lib/Streaming/ByteString.hs  2022-08-26 
07:27:21.000000000 +0200
@@ -72,6 +72,7 @@
 
     -- * Transforming ByteStreams
   , map
+  , for
   , intercalate
   , intersperse
 
@@ -639,6 +640,20 @@
 map f z = dematerialize z Empty (Chunk . B.map f) Go
 {-# INLINE map #-}
 
+-- | @'for' xs f@ applies @f@ to each chunk in the stream, and
+-- concatenates the resulting streams.
+--
+-- Generalised in 0.2.4 to match @streaming@: the callback's (ignored)
+-- return value can be of any type.
+--
+-- @since 0.2.3
+for :: Monad m => ByteStream m r -> (P.ByteString -> ByteStream m x) -> 
ByteStream m r
+for stream f = case stream of
+  Empty r -> Empty r
+  Chunk bs bss -> f bs *> for bss f
+  Go m -> Go ((`for` f) <$> m)
+{-# INLINE for #-}
+
 -- -- | /O(n)/ 'reverse' @xs@ returns the elements of @xs@ in reverse order.
 -- reverse :: ByteString -> ByteString
 -- reverse cs0 = rev Empty cs0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/streaming-bytestring-0.2.2/streaming-bytestring.cabal 
new/streaming-bytestring-0.2.4/streaming-bytestring.cabal
--- old/streaming-bytestring-0.2.2/streaming-bytestring.cabal   2022-05-18 
19:50:51.000000000 +0200
+++ new/streaming-bytestring-0.2.4/streaming-bytestring.cabal   2022-08-26 
07:27:21.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:      >=1.10
 name:               streaming-bytestring
-version:            0.2.2
+version:            0.2.4
 synopsis:           Fast, effectful byte streams.
 description:
   This library enables fast and safe streaming of byte data, in either @Word8@ 
or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/streaming-bytestring-0.2.2/tests/Test.hs 
new/streaming-bytestring-0.2.4/tests/Test.hs
--- old/streaming-bytestring-0.2.2/tests/Test.hs        2020-10-21 
19:01:38.000000000 +0200
+++ new/streaming-bytestring-0.2.4/tests/Test.hs        2022-08-18 
12:04:40.000000000 +0200
@@ -370,6 +370,11 @@
         unpackToString (Q8.concat (Q8.lineSplit n (fromString str))) == str
     , testProperty "concat after lineSplit round trips (CRLF)" $ over ((,) <$> 
nats <~> strSeriesCrlf) $ \(n,str) ->
         unpackToString (Q8.concat (Q8.lineSplit n (fromString str))) == str
+    , testProperty "'for' is equivalent to the one in streaming" $ over 
chunksSeries $ \ss ->
+        let doubleStream b = S.each [b, b]
+            doubleByteStream b = Q.chunk b *> Q.chunk b
+        in unpackToString (Q.fromChunks (S.for (Q.toChunks (fromChunks ss)) 
doubleStream))
+           == unpackToString (Q.for (fromChunks ss) doubleByteStream)
     ]
   , testGroup "Unit Tests"
     [ testCase "hGetContents: Handle stays open" handleIsOpen

Reply via email to