packages feed

pipes 4.3.15 → 4.3.16

raw patch · 3 files changed

+39/−5 lines, 3 filesdep ~criteriondep ~mmorphdep ~mtl

Dependency ranges changed: criterion, mmorph, mtl, optparse-applicative, transformers

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+4.3.16++* Fix example code for `every`+* Improved documentation for `ListT`+ 4.3.15  * Build against `ghc-9.0`
pipes.cabal view
@@ -1,5 +1,5 @@ Name: pipes-Version: 4.3.15+Version: 4.3.16 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
src/Pipes.hs view
@@ -401,10 +401,39 @@  {-| The list monad transformer, which extends a monad with non-determinism -    'return' corresponds to 'yield', yielding a single value+    The type variables signify: -    ('>>=') corresponds to 'for', calling the second computation once for each-    time the first computation 'yield's.+      * @m@ - The base monad+      * @a@ - The values that the computation 'yield's throughout its execution++    For basic construction and composition of 'ListT' computations, much can be+    accomplished using common typeclass methods.++      * 'return' corresponds to 'yield', yielding a single value.+      * ('>>=') corresponds to 'for', calling the second computation once+        for each time the first computation 'yield's.+      * 'mempty' neither 'yield's any values nor produces any effects in the+        base monad.+      * ('<>') sequences two computations, 'yield'ing all the values of the+        first followed by all the values of the second.+      * 'lift' converts an action in the base monad into a ListT computation+        which performs the action and 'yield's a single value.++    'ListT' is a newtype wrapper for 'Producer'. You will likely need to use+    'Select' and 'enumerate' to convert back and forth between these two types+    to take advantage of all the 'Producer'-related utilities that+    "Pipes.Prelude" has to offer.++      * To lift a plain list into a 'ListT' computation, first apply 'each'+        to turn the list into a 'Producer'. Then apply the 'Select'+        constructor to convert from 'Producer' to 'ListT'.+      * For other ways to construct 'ListT' computations, see the+        “Producers” section in "Pipes.Prelude" to build 'Producer's.+        These can then be converted to 'ListT' using 'Select'.+      * To aggregate the values from a 'ListT' computation (for example,+        to compute the sum of a 'ListT' of numbers), first apply+        'enumerate' to obtain a 'Producer'. Then see the “Folds”+        section in "Pipes.Prelude" to proceed. -} newtype ListT m a = Select { enumerate :: Producer a m () } @@ -656,7 +685,7 @@ {-| 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 -> 'Producer' a m () @ -} every :: (Monad m, Enumerable t) => t m a -> Proxy x' x () a m ()