conduit 1.0.13 → 1.0.13.1
raw patch · 3 files changed
+22/−3 lines, 3 files
Files
- Data/Conduit.hs +2/−2
- conduit.cabal +2/−1
- test/main.hs +18/−0
Data/Conduit.hs view
@@ -302,8 +302,8 @@ fmap _ Flush = Flush fmap f (Chunk a) = Chunk (f a) --- | A wrapper for defining an 'Applicative' instance for 'Sink's which allows--- to combine sinks together, generalizing 'zipSources'. A combined sources+-- | A wrapper for defining an 'Applicative' instance for 'Source's which allows+-- to combine sources together, generalizing 'zipSources'. A combined source -- will take input yielded from each of its @Source@s until any of them stop -- producing output. --
conduit.cabal view
@@ -1,5 +1,5 @@ Name: conduit-Version: 1.0.13+Version: 1.0.13.1 Synopsis: Streaming data processing library. Description: @conduit@ is a solution to the streaming data problem, allowing for production, transformation, and consumption of streams of data in constant memory. It is an alternative to lazy I\/O which guarantees deterministic resource handling, and fits in the same general solution space as @enumerator@\/@iteratee@ and @pipes@. For a tutorial, please visit <https://haskell.fpcomplete.com/user/snoyberg/library-documentation/conduit-overview>.@@ -79,6 +79,7 @@ , text , resourcet , void+ , containers ghc-options: -Wall --test-suite doctests
test/main.hs view
@@ -39,6 +39,7 @@ import Data.Void (Void) import qualified Control.Concurrent.MVar as M import Control.Monad.Error (catchError, throwError, Error)+import qualified Data.Map as Map (@=?) :: (Eq a, Show a) => a -> a -> IO () (@=?) = flip shouldBe@@ -1135,6 +1136,23 @@ (Left _, Right ()) -> return () _ -> error $ show exc++ describe "sequenceSources" $ do+ it "works" $ do+ let src1 = mapM_ C.yield [1, 2, 3 :: Int]+ src2 = mapM_ C.yield [3, 2, 1]+ src3 = mapM_ C.yield $ repeat 2+ srcs = C.sequenceSources $ Map.fromList+ [ (1 :: Int, src1)+ , (2, src2)+ , (3, src3)+ ]+ res <- srcs C.$$ CL.consume+ res `shouldBe`+ [ Map.fromList [(1, 1), (2, 3), (3, 2)]+ , Map.fromList [(1, 2), (2, 2), (3, 2)]+ , Map.fromList [(1, 3), (2, 1), (3, 2)]+ ] it' :: String -> IO () -> Spec it' = it