pipes 4.1.1 → 4.1.2
raw patch · 4 files changed
+18/−20 lines, 4 filesdep ~mtldep ~transformersPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: mtl, transformers
API changes (from Hackage documentation)
Files
- pipes.cabal +8/−8
- src/Pipes/Internal.hs +3/−1
- src/Pipes/Prelude.hs +0/−4
- src/Pipes/Tutorial.hs +7/−7
pipes.cabal view
@@ -1,5 +1,5 @@ Name: pipes -Version: 4.1.1 +Version: 4.1.2 Cabal-Version: >= 1.10 Build-Type: Simple License: BSD3 @@ -44,9 +44,9 @@ HS-Source-Dirs: src Build-Depends: base >= 4 && < 5 , - transformers >= 0.2.0.0 && < 0.4, + transformers >= 0.2.0.0 && < 0.5, mmorph >= 1.0.0 && < 1.1, - mtl >= 2.0.1.0 && < 2.2 + mtl >= 2.0.1.0 && < 2.3 Exposed-Modules: Pipes, @@ -67,7 +67,7 @@ Build-Depends: base >= 4 && < 5 , criterion >= 0.6.2.1 && < 0.9, - mtl >= 2.0.1.0 && < 2.2, + mtl >= 2.0.1.0 && < 2.3, pipes >= 4.0.0 && < 4.2 test-suite tests @@ -81,10 +81,10 @@ base >= 4 && < 5 , pipes >= 4.0.0 && < 4.2 , QuickCheck >= 2.4 && < 3 , - mtl >= 2.0.1 && < 2.2 , + mtl >= 2.0.1 && < 2.3 , test-framework >= 0.4 && < 1 , test-framework-quickcheck2 >= 0.2.0 && < 0.4 , - transformers >= 0.2.0.0 && < 0.4 + transformers >= 0.2.0.0 && < 0.5 Benchmark lift-benchmarks Default-Language: Haskell2010 @@ -97,6 +97,6 @@ base >= 4 && < 5 , criterion >= 0.6.2.1 && < 0.9, deepseq , - mtl >= 2.0.1.0 && < 2.2, + mtl >= 2.0.1.0 && < 2.3, pipes >= 4.0.0 && < 4.2, - transformers >= 0.2.0.0 && < 0.4 + transformers >= 0.2.0.0 && < 0.5
src/Pipes/Internal.hs view
@@ -35,7 +35,8 @@ , closed ) where -import Control.Applicative (Applicative(pure, (<*>)), Alternative(empty, (<|>))) +import Control.Applicative ( + Applicative(pure, (<*>), (*>)), Alternative(empty, (<|>)) ) import Control.Monad (MonadPlus(..)) import Control.Monad.IO.Class (MonadIO(liftIO)) import Control.Monad.Trans.Class (MonadTrans(lift)) @@ -83,6 +84,7 @@ Respond b fb' -> Respond b (\b' -> go (fb' b')) M m -> M (m >>= \p' -> return (go p')) Pure f -> fmap f px + (*>) = (>>) instance Monad m => Monad (Proxy a' a b' b m) where return = Pure
src/Pipes/Prelude.hs view
@@ -194,10 +194,6 @@ > replicateM 0 x = return () > > replicateM (m + n) x = replicateM m x >> replicateM n x -- 0 <= {m,n} - -> replicateM 1 = lift -> -> replicateM (m * n) = replicateM m >|> replicate n -- 0 <= {m,n} -} replicateM :: Monad m => Int -> m a -> Producer' a m () replicateM n m = lift m >~ take n
src/Pipes/Tutorial.hs view
@@ -438,9 +438,9 @@ @ (~>) :: Monad m - => (a -> 'Producer' b m r) - -> (b -> 'Producer' c m r) - -> (a -> 'Producer' c m r) + => (a -> 'Producer' b m ()) + -> (b -> 'Producer' c m ()) + -> (a -> 'Producer' c m ()) (f ~> g) x = for (f x) g @ @@ -448,9 +448,9 @@ into the following more symmetric equation: @ - f :: Monad m => a -> 'Producer' b m r - g :: Monad m => b -> 'Producer' c m r - h :: Monad m => c -> 'Producer' d m r + f :: Monad m => a -> 'Producer' b m () + g :: Monad m => b -> 'Producer' c m () + h :: Monad m => c -> 'Producer' d m () \ \-\- Associativity (f ~> g) ~> h = f ~> (g ~> h) @@ -568,7 +568,7 @@ @ One way to feed a 'Consumer' is to repeatedly feed the same input using - using ('>~') (pronounced \"feed\"): + ('>~') (pronounced \"feed\"): @ \-\- +- Feed +- Consumer to +- Returns new