Hello community, here is the log from the commit of package ghc-lifted-async for openSUSE:Factory checked in at 2017-07-11 08:26:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-lifted-async (Old) and /work/SRC/openSUSE:Factory/.ghc-lifted-async.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-lifted-async" Tue Jul 11 08:26:45 2017 rev:8 rq:509058 version:0.9.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-lifted-async/ghc-lifted-async.changes 2017-02-22 13:53:34.280002576 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-lifted-async.new/ghc-lifted-async.changes 2017-07-11 08:26:46.331604060 +0200 @@ -1,0 +2,5 @@ +Fri Jun 30 03:01:57 UTC 2017 - [email protected] + +- Update to version 0.9.3. + +------------------------------------------------------------------- Old: ---- lifted-async-0.9.1.1.tar.gz New: ---- lifted-async-0.9.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-lifted-async.spec ++++++ --- /var/tmp/diff_new_pack.Di7Fi5/_old 2017-07-11 08:26:48.695270664 +0200 +++ /var/tmp/diff_new_pack.Di7Fi5/_new 2017-07-11 08:26:48.695270664 +0200 @@ -19,7 +19,7 @@ %global pkg_name lifted-async %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.9.1.1 +Version: 0.9.3 Release: 0 Summary: Run lifted IO operations asynchronously and wait for their results License: BSD-3-Clause ++++++ lifted-async-0.9.1.1.tar.gz -> lifted-async-0.9.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lifted-async-0.9.1.1/CHANGELOG.md new/lifted-async-0.9.3/CHANGELOG.md --- old/lifted-async-0.9.1.1/CHANGELOG.md 2017-01-26 07:57:22.000000000 +0100 +++ new/lifted-async-0.9.3/CHANGELOG.md 2017-06-26 05:57:30.000000000 +0200 @@ -1,3 +1,13 @@ +## v0.9.3 - 2017-06-26 + +* Add Haddock comments for concurrently_ (#23) +* Add replicateConcurrently and replicateConcurrently_ +* Test with GHC 8.2.1 on Travis + +## v0.9.2 - 2017-06-24 + +* Add concurrently_ (#22) + ## v0.9.1.1 - 2017-01-26 * Relax upper version bound for constraints diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lifted-async-0.9.1.1/README.md new/lifted-async-0.9.3/README.md --- old/lifted-async-0.9.1.1/README.md 2017-01-26 07:57:22.000000000 +0100 +++ new/lifted-async-0.9.3/README.md 2017-06-26 05:56:39.000000000 +0200 @@ -3,8 +3,8 @@ [](https://hackage.haskell.org/package/lifted-async) [](http://packdeps.haskellers.com/feed?needle=lifted-async) [](http://stackage.org/lts/package/lifted-async) -[](http://travis-ci.org/maoe/lifted-async) -[](https://gitter.im/maoe/lifted-async) +[](https://travis-ci.org/maoe/lifted-async) +[](https://gitter.im/maoe/lifted-async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) This package provides IO operations from [async](http://hackage.haskell.org/package/async) package lifted to any instance of `MonadBase` or `MonadBaseControl` from [monad-control](http://hackage.haskell.org/package/monad-control) package. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lifted-async-0.9.1.1/lifted-async.cabal new/lifted-async-0.9.3/lifted-async.cabal --- old/lifted-async-0.9.1.1/lifted-async.cabal 2017-01-26 07:57:22.000000000 +0100 +++ new/lifted-async-0.9.3/lifted-async.cabal 2017-06-26 05:57:30.000000000 +0200 @@ -1,5 +1,5 @@ name: lifted-async -version: 0.9.1.1 +version: 0.9.3 synopsis: Run lifted IO operations asynchronously and wait for their results homepage: https://github.com/maoe/lifted-async bug-reports: https://github.com/maoe/lifted-async/issues @@ -12,7 +12,8 @@ build-type: Simple cabal-version: >= 1.8 tested-with: - GHC == 8.0.2 + GHC == 8.2.1 + , GHC == 8.0.2 , GHC == 7.10.2 , GHC == 7.8.4 , GHC == 7.6.3 @@ -35,8 +36,8 @@ Control.Concurrent.Async.Lifted Control.Concurrent.Async.Lifted.Safe build-depends: - base >= 4.5 && < 4.10 - , async >= 2.0.1 && < 2.2 + base >= 4.5 && < 4.11 + , async >= 2.1.1 && < 2.2 , lifted-base >= 0.2 && < 0.3 , transformers-base >= 0.4 && < 0.5 if flag(monad-control-1) @@ -115,5 +116,5 @@ source-repository this type: git - tag: v0.9.1.1 + tag: v0.9.3 location: https://github.com/maoe/lifted-async.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lifted-async-0.9.1.1/src/Control/Concurrent/Async/Lifted/Safe.hs new/lifted-async-0.9.3/src/Control/Concurrent/Async/Lifted/Safe.hs --- old/lifted-async-0.9.1.1/src/Control/Concurrent/Async/Lifted/Safe.hs 2017-01-13 00:46:30.000000000 +0100 +++ new/lifted-async-0.9.3/src/Control/Concurrent/Async/Lifted/Safe.hs 2017-06-26 05:56:39.000000000 +0200 @@ -67,9 +67,10 @@ , Unsafe.link, Unsafe.link2 -- * Convenient utilities - , race, race_, concurrently + , race, race_, concurrently, concurrently_ , mapConcurrently, mapConcurrently_ , forConcurrently, forConcurrently_ + , replicateConcurrently, replicateConcurrently_ , Concurrently(..) @@ -87,6 +88,7 @@ import Control.Applicative import Control.Concurrent (threadDelay) import Control.Monad +import Data.Foldable (fold) import Control.Concurrent.Async (Async) import Control.Exception.Lifted (SomeException, Exception) @@ -327,6 +329,12 @@ => m a -> m b -> m (a, b) concurrently = liftBaseOp2_ A.concurrently +-- | Generalized version of 'A.concurrently_'. +concurrently_ + :: forall m a b. (MonadBaseControl IO m, Forall (Pure m)) + => m a -> m b -> m () +concurrently_ = liftBaseOp2_ A.concurrently_ + -- | Similar to 'A.liftBaseOp_' but takes a binary function -- and leverages @'StM' m a ~ a@. liftBaseOp2_ @@ -369,6 +377,24 @@ -> m () forConcurrently_ = flip mapConcurrently_ +-- | Generalized version of 'A.replicateConcurrently'. +replicateConcurrently + :: (MonadBaseControl IO m, Forall (Pure m)) + => Int + -> m a + -> m [a] +replicateConcurrently n = + runConcurrently . sequenceA . replicate n . Concurrently + +-- | Generalized version of 'A.replicateConcurrently_'. +replicateConcurrently_ + :: (MonadBaseControl IO m, Forall (Pure m)) + => Int + -> m a + -> m () +replicateConcurrently_ n = + runConcurrently . fold . replicate n . Concurrently . void + -- | Generalized version of 'A.Concurrently'. -- -- A value of type @'Concurrently' m a@ is an IO-based operation that can be diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lifted-async-0.9.1.1/src/Control/Concurrent/Async/Lifted.hs new/lifted-async-0.9.3/src/Control/Concurrent/Async/Lifted.hs --- old/lifted-async-0.9.1.1/src/Control/Concurrent/Async/Lifted.hs 2017-01-13 00:46:30.000000000 +0100 +++ new/lifted-async-0.9.3/src/Control/Concurrent/Async/Lifted.hs 2017-06-26 05:56:39.000000000 +0200 @@ -63,15 +63,17 @@ , link, link2 -- * Convenient utilities - , race, race_, concurrently + , race, race_, concurrently, concurrently_ , mapConcurrently, mapConcurrently_ , forConcurrently, forConcurrently_ + , replicateConcurrently, replicateConcurrently_ , Concurrently(..) ) where import Control.Applicative import Control.Concurrent (threadDelay) import Control.Monad ((>=>), forever, liftM, void) +import Data.Foldable (fold) import GHC.IO (unsafeUnmask) import Prelude hiding (mapM) @@ -362,6 +364,11 @@ waitBoth a b {-# INLINABLE concurrently #-} +-- | Generalized version of 'A.concurrently_'. +concurrently_ :: MonadBaseControl IO m => m a -> m b -> m () +concurrently_ left right = void $ concurrently left right +{-# INLINABLE concurrently_ #-} + -- | Generalized version of 'A.mapConcurrently'. mapConcurrently :: (Traversable t, MonadBaseControl IO m) @@ -394,6 +401,24 @@ -> m () forConcurrently_ = flip mapConcurrently_ +-- | Generalized version of 'A.replicateConcurrently'. +replicateConcurrently + :: MonadBaseControl IO m + => Int + -> m a + -> m [a] +replicateConcurrently n = + runConcurrently . sequenceA . replicate n . Concurrently + +-- | Generalized version of 'A.replicateConcurrently_'. +replicateConcurrently_ + :: MonadBaseControl IO m + => Int + -> m a + -> m () +replicateConcurrently_ n = + runConcurrently . fold . replicate n . Concurrently . void + -- | Generalized version of 'A.Concurrently'. -- -- A value of type @'Concurrently' m a@ is an IO-based operation that can be
