commit ghc-pipes-misc for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package ghc-pipes-misc for openSUSE:Factory checked in at 2017-08-31 20:57:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-pipes-misc (Old) and /work/SRC/openSUSE:Factory/.ghc-pipes-misc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-pipes-misc" Thu Aug 31 20:57:53 2017 rev:2 rq:513451 version:0.3.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-pipes-misc/ghc-pipes-misc.changes 2017-04-14 13:35:44.108231364 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-pipes-misc.new/ghc-pipes-misc.changes 2017-08-31 20:57:55.731063308 +0200 @@ -1,0 +2,5 @@ +Thu Jul 27 14:08:15 UTC 2017 - psimons@suse.com + +- Update to version 0.3.0.0. + +------------------------------------------------------------------- Old: ---- pipes-misc-0.2.5.0.tar.gz New: ---- pipes-misc-0.3.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-pipes-misc.spec ++++++ --- /var/tmp/diff_new_pack.gqOGQy/_old 2017-08-31 20:57:56.906898099 +0200 +++ /var/tmp/diff_new_pack.gqOGQy/_new 2017-08-31 20:57:56.926895290 +0200 @@ -19,7 +19,7 @@ %global pkg_name pipes-misc %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.2.5.0 +Version: 0.3.0.0 Release: 0 Summary: Miscellaneous utilities for pipes, required by glazier-tutorial License: BSD-3-Clause ++++++ pipes-misc-0.2.5.0.tar.gz -> pipes-misc-0.3.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-misc-0.2.5.0/pipes-misc.cabal new/pipes-misc-0.3.0.0/pipes-misc.cabal --- old/pipes-misc-0.2.5.0/pipes-misc.cabal 2017-02-17 11:23:18.000000000 +0100 +++ new/pipes-misc-0.3.0.0/pipes-misc.cabal 2017-02-22 22:15:26.000000000 +0100 @@ -1,5 +1,5 @@ name: pipes-misc -version: 0.2.5.0 +version: 0.3.0.0 synopsis: Miscellaneous utilities for pipes, required by glazier-tutorial description: Please see README.md homepage: https://github.com/louispan/pipes-misc#readme diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-misc-0.2.5.0/src/Pipes/Misc/Concurrent.hs new/pipes-misc-0.3.0.0/src/Pipes/Misc/Concurrent.hs --- old/pipes-misc-0.2.5.0/src/Pipes/Misc/Concurrent.hs 2017-02-14 12:46:50.000000000 +0100 +++ new/pipes-misc-0.3.0.0/src/Pipes/Misc/Concurrent.hs 2017-02-22 23:06:32.000000000 +0100 @@ -6,12 +6,14 @@ import Control.Concurrent import Control.Concurrent.STM import Control.Monad -import Control.Monad.Trans.Class +import Control.Monad.Morph import Control.Monad.Trans.Except import Control.Monad.Trans.Maybe +import Control.Monad.Trans.Reader import qualified Data.List.NonEmpty as NE import qualified Pipes as P import qualified Pipes.Concurrent as PC +import qualified Pipes.Prelude as PP -- | Like Pipes.Concurrent.fromInput, but stays in STM. -- Using @hoist atomically@ to convert to IO monad seems to work. @@ -77,3 +79,12 @@ Nothing -> Left ys -- return successful reads so far Just x' -> Right $ x' NE.<| ys {-# INLINABLE batch #-} + +-- | Combine a 'Pipes.Concurrent.Input' and a 'ReaderT a STM r' into a 'Pipes.Producer' of the result r. +-- That is, given a input of messages, and something that executes the messages to produce a result r, +-- combine them to get a Producer of the executed results. +execInput + :: (MonadTrans t, Monad (t STM)) + => PC.Input a -> ReaderT a (t STM) b -> P.Producer' b (t STM) () +execInput input m = hoist lift (fromInputSTM input) P.>-> PP.mapM (runReaderT m) +{-# INLINABLE execInput #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-misc-0.2.5.0/src/Pipes/Misc/State/Lazy.hs new/pipes-misc-0.3.0.0/src/Pipes/Misc/State/Lazy.hs --- old/pipes-misc-0.2.5.0/src/Pipes/Misc/State/Lazy.hs 2017-02-17 11:22:53.000000000 +0100 +++ new/pipes-misc-0.3.0.0/src/Pipes/Misc/State/Lazy.hs 2017-02-22 22:05:02.000000000 +0100 @@ -2,14 +2,10 @@ module Pipes.Misc.State.Lazy where -import Control.Concurrent.STM import Control.Lens -import Control.Monad.Morph import Control.Monad.Reader import Control.Monad.State.Lazy import qualified Pipes as P -import qualified Pipes.Concurrent as PC -import qualified Pipes.Misc.Concurrent as PM import qualified Pipes.Prelude as PP -- | Store the output of the pipe into a MonadState. @@ -43,21 +39,3 @@ f s pure a {-# INLINABLE onState #-} - --- | Converts a 'Glazier.Gadget' into a 'Pipes.Pipe' -rsPipe :: (Monad m, MonadTrans t, MonadState s (t m)) => ReaderT a (StateT s m) b -> P.Pipe a b (t m) r -rsPipe m = forever $ do - a <- P.await - s <- get - -- This is the only line that is different between the Strict and Lazy version - ~(c, s') <- lift . lift $ runStateT (runReaderT m a) s - put s' - P.yield c -{-# INLINABLE rsPipe #-} - --- | Convert a 'Pipes.Concurrent.Input' and a 'Glazier.Gadget' into a stateful 'Pipes.Producer' of commands to interpret. -rsProducer :: - (MonadState s (t STM), MonadTrans t) => - PC.Input a -> ReaderT a (StateT s STM) c -> P.Producer' c (t STM) () -rsProducer input m = hoist lift (PM.fromInputSTM input) P.>-> rsPipe m -{-# INLINABLE rsProducer #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pipes-misc-0.2.5.0/src/Pipes/Misc/State/Strict.hs new/pipes-misc-0.3.0.0/src/Pipes/Misc/State/Strict.hs --- old/pipes-misc-0.2.5.0/src/Pipes/Misc/State/Strict.hs 2017-02-17 11:23:02.000000000 +0100 +++ new/pipes-misc-0.3.0.0/src/Pipes/Misc/State/Strict.hs 2017-02-22 22:05:17.000000000 +0100 @@ -2,14 +2,9 @@ module Pipes.Misc.State.Strict where -import Control.Concurrent.STM import Control.Lens -import Control.Monad.Morph -import Control.Monad.Reader import Control.Monad.State.Strict import qualified Pipes as P -import qualified Pipes.Concurrent as PC -import qualified Pipes.Misc.Concurrent as PM import qualified Pipes.Prelude as PP -- | Store the output of the pipe into a MonadState. @@ -43,21 +38,3 @@ f s pure a {-# INLINABLE onState #-} - --- | Converts a 'Glazier.Gadget' into a 'Pipes.Pipe' -rsPipe :: (Monad m, MonadTrans t, MonadState s (t m)) => ReaderT a (StateT s m) b -> P.Pipe a b (t m) r -rsPipe m = forever $ do - a <- P.await - s <- get - -- This is the only line that is different between the Strict and Lazy version - (c, s') <- lift . lift $ runStateT (runReaderT m a) s - put s' - P.yield c -{-# INLINABLE rsPipe #-} - --- | Convert a 'Pipes.Concurrent.Input' and a 'Glazier.Gadget' into a stateful 'Pipes.Producer' of commands to interpret. -rsProducer :: - (MonadState s (t STM), MonadTrans t) => - PC.Input a -> ReaderT a (StateT s STM) b -> P.Producer' b (t STM) () -rsProducer input m = hoist lift (PM.fromInputSTM input) P.>-> rsPipe m -{-# INLINABLE rsProducer #-}
participants (1)
-
root@hilbert.suse.de