Hello community, here is the log from the commit of package ghc-conduit for openSUSE:Factory checked in at 2017-03-03 17:48:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-conduit (Old) and /work/SRC/openSUSE:Factory/.ghc-conduit.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-conduit" Fri Mar 3 17:48:46 2017 rev:15 rq:461616 version:1.2.9 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-conduit/ghc-conduit.changes 2016-10-14 09:06:13.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-conduit.new/ghc-conduit.changes 2017-03-03 17:48:47.269077610 +0100 @@ -1,0 +2,5 @@ +Sun Feb 12 14:16:51 UTC 2017 - [email protected] + +- Update to version 1.2.9 with cabal2obs. + +------------------------------------------------------------------- Old: ---- conduit-1.2.8.tar.gz New: ---- conduit-1.2.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-conduit.spec ++++++ --- /var/tmp/diff_new_pack.fhuW4Q/_old 2017-03-03 17:48:47.856994579 +0100 +++ /var/tmp/diff_new_pack.fhuW4Q/_new 2017-03-03 17:48:47.860994015 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-conduit # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 conduit %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.2.8 +Version: 1.2.9 Release: 0 Summary: Streaming data processing library License: MIT @@ -42,18 +42,21 @@ BuildRequires: ghc-containers-devel BuildRequires: ghc-hspec-devel BuildRequires: ghc-safe-devel +BuildRequires: ghc-split-devel %endif %description -Hackage documentation generation is not reliable. For up to date documentation, -please see: <http://www.stackage.org/package/conduit>. - -'conduit' is a solution to the streaming data problem, allowing for production, +`conduit` is a solution to the streaming data problem, allowing for production, transformation, and consumption of streams of data in constant memory. It is an alternative to lazy I/O which guarantees deterministic resource -handling, and fits in the same general solution space as -'enumerator'/'iteratee' and 'pipes'. For a tutorial, please visit -<https://www.fpcomplete.com/user/snoyberg/library-documentation/conduit-overview>. +handling. + +For more information about conduit in general, and how this package in +particular fits into the ecosystem, see [the conduit +homepage](https://github.com/snoyberg/conduit#readme). + +Hackage documentation generation is not reliable. For up to date documentation, +please see: <http://www.stackage.org/package/conduit>. %package devel Summary: Haskell %{pkg_name} library development files ++++++ conduit-1.2.8.tar.gz -> conduit-1.2.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conduit-1.2.8/ChangeLog.md new/conduit-1.2.9/ChangeLog.md --- old/conduit-1.2.8/ChangeLog.md 2016-09-27 15:39:10.000000000 +0200 +++ new/conduit-1.2.9/ChangeLog.md 2017-02-08 06:03:05.000000000 +0100 @@ -1,3 +1,7 @@ +## 1.2.9 + +* `chunksOf` [#296](https://github.com/snoyberg/conduit/pull/296) + ## 1.2.8 * Implement diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conduit-1.2.8/Data/Conduit/Internal/Conduit.hs new/conduit-1.2.9/Data/Conduit/Internal/Conduit.hs --- old/conduit-1.2.8/Data/Conduit/Internal/Conduit.hs 2016-09-27 15:39:10.000000000 +0200 +++ new/conduit-1.2.9/Data/Conduit/Internal/Conduit.hs 2016-11-23 07:54:22.000000000 +0100 @@ -931,7 +931,7 @@ {-# INLINE yieldOr #-} -- | Wait for input forever, calling the given inner component for each piece of --- new input. Returns the upstream result type. +-- new input. -- -- This function is provided as a convenience for the common pattern of -- @await@ing input, checking if it's @Just@ and then looping. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conduit-1.2.8/Data/Conduit/List.hs new/conduit-1.2.9/Data/Conduit/List.hs --- old/conduit-1.2.8/Data/Conduit/List.hs 2016-09-27 15:39:10.000000000 +0200 +++ new/conduit-1.2.9/Data/Conduit/List.hs 2017-02-08 06:03:05.000000000 +0100 @@ -50,6 +50,7 @@ , scanl , scan , mapAccum + , chunksOf , groupBy , groupOn1 , isolate @@ -80,6 +81,7 @@ , Enum, Eq , maybe , (<=) + , (>) ) import Data.Monoid (Monoid, mempty, mappend) import qualified Data.Foldable as F @@ -618,8 +620,7 @@ STREAMING(mapFoldableM, mapFoldableMC, mapFoldableMS, f) -- | Consume all values from the stream and return as a list. Note that this --- will pull all values into memory. For a lazy variant, see --- "Data.Conduit.Lazy". +-- will pull all values into memory. -- -- Subject to fusion -- @@ -632,6 +633,25 @@ {-# INLINE consumeC #-} STREAMING0(consume, consumeC, consumeS) +-- | Group a stream into chunks of a given size. The last chunk may contain +-- fewer than n elements. +-- +-- Subject to fusion +-- +-- Since 1.2.9 +chunksOf :: Monad m => Int -> Conduit a m [a] +chunksOf n = + start + where + start = await >>= maybe (return ()) (\x -> loop n (x:)) + + loop !count rest = + await >>= maybe (yield (rest [])) go + where + go y + | count > 1 = loop (count - 1) (rest . (y:)) + | otherwise = yield (rest []) >> loop n (y:) + -- | Grouping input according to an equality function. -- -- Subject to fusion diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conduit-1.2.8/conduit.cabal new/conduit-1.2.9/conduit.cabal --- old/conduit-1.2.8/conduit.cabal 2016-09-27 15:39:10.000000000 +0200 +++ new/conduit-1.2.9/conduit.cabal 2017-02-08 06:03:05.000000000 +0100 @@ -1,10 +1,16 @@ Name: conduit -Version: 1.2.8 +Version: 1.2.9 Synopsis: Streaming data processing library. description: - Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/conduit>. + `conduit` is a solution to the streaming data problem, allowing for production, + transformation, and consumption of streams of data in constant memory. It is an + alternative to lazy I\/O which guarantees deterministic resource handling. + . + For more information about conduit in general, and how this package in + particular fits into the ecosystem, see [the conduit + homepage](https://github.com/snoyberg/conduit#readme). . - @conduit@ is a solution to the streaming data problem, allowing for production, transformation, and consumption of streams of data in constant memory. It is an alternative to lazy I\/O which guarantees deterministic resource handling, and fits in the same general solution space as @enumerator@\/@iteratee@ and @pipes@. For a tutorial, please visit <https://www.fpcomplete.com/user/snoyberg/library-documentation/conduit-overview>. + Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/conduit>. License: MIT License-file: LICENSE Author: Michael Snoyman @@ -58,6 +64,7 @@ , containers , exceptions >= 0.6 , safe + , split >= 0.2.0.0 if !impl(ghc>=7.9) build-depends: void ghc-options: -Wall diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/conduit-1.2.8/test/main.hs new/conduit-1.2.9/test/main.hs --- old/conduit-1.2.8/test/main.hs 2016-09-27 15:39:10.000000000 +0200 +++ new/conduit-1.2.9/test/main.hs 2017-02-08 06:03:05.000000000 +0100 @@ -16,6 +16,7 @@ import Control.Monad.Trans.Resource as C (runResourceT) import Data.Maybe (fromMaybe,catMaybes,fromJust) import qualified Data.List as DL +import qualified Data.List.Split as DLS (chunksOf) import Control.Monad.ST (runST) import Data.Monoid import qualified Data.IORef as I @@ -235,6 +236,12 @@ C.=$ CL.fold (+) 0 x `shouldBe` 2 * sum [1..10 :: Int] + prop "chunksOf" $ equivToList + (DLS.chunksOf 5 :: [Int]->[[Int]]) (CL.chunksOf 5) + + prop "chunksOf (negative)" $ equivToList + (map (:[]) :: [Int]->[[Int]]) (CL.chunksOf (-5)) + it "groupBy" $ do let input = [1::Int, 1, 2, 3, 3, 3, 4, 5, 5] x <- runResourceT $ CL.sourceList input
