unagi-streams 0.2.0 → 0.2.1
raw patch · 3 files changed
+23/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- src/System/IO/Streams/Concurrent/Unagi.hs +11/−0
- src/System/IO/Streams/Concurrent/Unagi/Bounded.hs +11/−0
- unagi-streams.cabal +1/−1
src/System/IO/Streams/Concurrent/Unagi.hs view
@@ -76,3 +76,14 @@ -- dupStream :: InChan (Maybe a) -> IO (InputStream a) dupStream = dupChan >=> chanToInput+++--------------------------------------------------------------------------------+-- | Write to the output stream and have it duplicated to each input stream.+splitStream :: IO (InputStream a, InputStream a, OutputStream a)+splitStream = do+ (inChan, _) <- newChan+ in1 <- dupStream inChan+ in2 <- dupStream inChan+ out1 <- chanToOutput inChan+ return (in1, in2, out1)
src/System/IO/Streams/Concurrent/Unagi/Bounded.hs view
@@ -77,3 +77,14 @@ -- dupStream :: InChan (Maybe a) -> IO (InputStream a) dupStream = dupChan >=> chanToInput+++--------------------------------------------------------------------------------+-- | Write to the output stream and have it duplicated to each input stream.+splitStream :: Int -> IO (InputStream a, InputStream a, OutputStream a)+splitStream chanSize = do+ (inChan, _) <- newChan chanSize+ in1 <- dupStream inChan+ in2 <- dupStream inChan+ out1 <- chanToOutput inChan+ return (in1, in2, out1)
unagi-streams.cabal view
@@ -1,5 +1,5 @@ name: unagi-streams-version: 0.2.0+version: 0.2.1 synopsis: Unagi Chan IO-Streams description: Io-streams chans implemented underneath with unagi-chans. This library is a straight port of