packages feed

pipes 4.3.14 → 4.3.15

raw patch · 4 files changed

+45/−19 lines, 4 filesdep ~criteriondep ~optparse-applicativePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: criterion, optparse-applicative

API changes (from Hackage documentation)

- Pipes: each :: (Functor m, Foldable f) => f a -> Producer' a m ()
+ Pipes: each :: (Functor m, Foldable f) => f a -> Proxy x' x () a m ()
- Pipes: embed :: (MMonad t, Monad n) => (forall a. () => m a -> t n a) -> t m b -> t n b
+ Pipes: embed :: forall (n :: Type -> Type) m b. (MMonad t, Monad n) => (forall a. () => m a -> t n a) -> t m b -> t n b
- Pipes: every :: (Monad m, Enumerable t) => t m a -> Producer' a m ()
+ Pipes: every :: (Monad m, Enumerable t) => t m a -> Proxy x' x () a m ()
- Pipes: hoist :: (MFunctor t, Monad m) => (forall a. () => m a -> n a) -> t m b -> t n b
+ Pipes: hoist :: forall m n (b :: k). (MFunctor t, Monad m) => (forall a. () => m a -> n a) -> t m b -> t n b
- Pipes: yield :: Functor m => a -> Producer' a m ()
+ Pipes: yield :: Functor m => a -> Proxy x' x () a m ()
- Pipes.Prelude: fromHandle :: MonadIO m => Handle -> Producer' String m ()
+ Pipes.Prelude: fromHandle :: MonadIO m => Handle -> Proxy x' x () String m ()
- Pipes.Prelude: repeatM :: Monad m => m a -> Producer' a m r
+ Pipes.Prelude: repeatM :: Monad m => m a -> Proxy x' x () a m r
- Pipes.Prelude: replicateM :: Monad m => Int -> m a -> Producer' a m ()
+ Pipes.Prelude: replicateM :: Monad m => Int -> m a -> Proxy x' x () a m ()
- Pipes.Prelude: zip :: Monad m => Producer a m r -> Producer b m r -> Producer' (a, b) m r
+ Pipes.Prelude: zip :: Monad m => Producer a m r -> Producer b m r -> Proxy x' x () (a, b) m r
- Pipes.Prelude: zipWith :: Monad m => (a -> b -> c) -> Producer a m r -> Producer b m r -> Producer' c m r
+ Pipes.Prelude: zipWith :: Monad m => (a -> b -> c) -> Producer a m r -> Producer b m r -> Proxy x' x () c m r

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+4.3.15++* Build against `ghc-9.0`+ 4.3.14  * Add `mapMaybe` and `wither`, and more laws for `filter` and `filterM`.
pipes.cabal view
@@ -1,5 +1,5 @@ Name: pipes-Version: 4.3.14+Version: 4.3.15 Cabal-Version: >= 1.10 Build-Type: Simple Tested-With: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1@@ -77,8 +77,8 @@      Build-Depends:         base      >= 4.4     && < 5  ,-        criterion >= 1.1.1.0 && < 1.5,-        optparse-applicative >= 0.12 && < 0.15,+        criterion >= 1.1.1.0 && < 1.6,+        optparse-applicative >= 0.12 && < 0.17,         mtl       >= 2.1     && < 2.3,         pipes @@ -108,8 +108,8 @@      Build-Depends:         base                 >= 4.4     && < 5   ,-        criterion            >= 1.1.1.0 && < 1.5 ,-        optparse-applicative >= 0.12    && < 0.15,+        criterion            >= 1.1.1.0 && < 1.6 ,+        optparse-applicative >= 0.12    && < 0.17,         mtl                  >= 2.1     && < 2.3 ,         pipes                                    ,         transformers         >= 0.2.0.0 && < 0.6
src/Pipes.hs view
@@ -134,10 +134,11 @@ {-| Produce a value  @-'yield' :: 'Monad' m => a -> 'Pipe' x a m ()+'yield' :: 'Monad' m => a -> 'Producer' a m ()+'yield' :: 'Monad' m => a -> 'Pipe'   x a m () @ -}-yield :: Functor m => a -> Producer' a m ()+yield :: Functor m => a -> Proxy x' x () a m () yield = respond {-# INLINABLE [1] yield #-} @@ -635,8 +636,13 @@         Pure    r    -> return (Left r) {-# INLINABLE next #-} --- | Convert a 'F.Foldable' to a 'Producer'-each :: (Functor m, Foldable f) => f a -> Producer' a m ()+{-| Convert a 'F.Foldable' to a 'Producer'++@+'each' :: ('Functor' m, 'Foldable' f) => f a -> 'Producer' a m ()+@+-}+each :: (Functor m, Foldable f) => f a -> Proxy x' x () a m () each = F.foldr (\a p -> yield a >> p) (return ()) {-# INLINABLE each #-} {-  The above code is the same as:@@ -647,8 +653,13 @@     build/foldr fusion -} --- | Convert an 'Enumerable' to a 'Producer'-every :: (Monad m, Enumerable t) => t m a -> Producer' a m ()+{-| Convert an 'Enumerable' to a 'Producer'++@+'each' :: ('Monad' m, 'Enumerable' t) => t m a -> 'Producer' a m ()+@+-}+every :: (Monad m, Enumerable t) => t m a -> Proxy x' x () a m () every it = discard >\\ enumerate (toListT it) {-# INLINABLE every #-} 
src/Pipes/Prelude.hs view
@@ -184,8 +184,12 @@ {-| Read 'String's from a 'IO.Handle' using 'IO.hGetLine'      Terminates on end of input++@+'fromHandle' :: 'MonadIO' m => 'IO.Handle' -> 'Producer' 'String' m ()+@ -}-fromHandle :: MonadIO m => IO.Handle -> Producer' String m ()+fromHandle :: MonadIO m => IO.Handle -> Proxy x' x () String m () fromHandle h = go   where     go = do@@ -196,8 +200,11 @@             go {-# INLINABLE fromHandle #-} --- | Repeat a monadic action indefinitely, 'yield'ing each result-repeatM :: Monad m => m a -> Producer' a m r+{-| Repeat a monadic action indefinitely, 'yield'ing each result++'repeatM' :: 'Monad' m => m a -> 'Producer' a m r+-}+repeatM :: Monad m => m a -> Proxy x' x () a m r repeatM m = lift m >~ cat {-# INLINABLE [1] repeatM #-} @@ -210,8 +217,12 @@ > replicateM  0      x = return () > > replicateM (m + n) x = replicateM m x >> replicateM n x  -- 0 <= {m,n}++@+'replicateM' :: 'Monad' m => Int -> m a -> 'Producer' a m ()+@ -}-replicateM :: Monad m => Int -> m a -> Producer' a m ()+replicateM :: Monad m => Int -> m a -> Proxy x' x () a m () replicateM n m = lift m >~ take n {-# INLINABLE replicateM #-} @@ -914,9 +925,9 @@  -- | Zip two 'Producer's zip :: Monad m-    => (Producer   a     m r)-    -> (Producer      b  m r)-    -> (Producer' (a, b) m r)+    => (Producer       a     m r)+    -> (Producer          b  m r)+    -> (Proxy x' x () (a, b) m r) zip = zipWith (,) {-# INLINABLE zip #-} @@ -925,7 +936,7 @@     => (a -> b -> c)     -> (Producer  a m r)     -> (Producer  b m r)-    -> (Producer' c m r)+    -> (Proxy x' x () c m r) zipWith f = go   where     go p1 p2 = do