pipes-concurrency 2.0.0 → 2.0.1
raw patch · 2 files changed
+7/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- pipes-concurrency.cabal +1/−1
- src/Pipes/Concurrent.hs +6/−3
pipes-concurrency.cabal view
@@ -1,5 +1,5 @@ Name: pipes-concurrency-Version: 2.0.0+Version: 2.0.1 Cabal-Version: >=1.8.0.2 Build-Type: Simple License: BSD3
src/Pipes/Concurrent.hs view
@@ -80,10 +80,13 @@ Nothing -> return Nothing Just a -> recv (f a) --- Deriving 'Alternative' instance Alternative Input where- empty = Input empty- x <|> y = Input (recv x <|> recv y)+ empty = Input (return Nothing)+ x <|> y = Input $ do+ (i, ma) <- fmap ((,) y) (recv x) <|> fmap ((,) x)(recv y)+ case ma of+ Nothing -> recv i+ Just a -> return (Just a) instance Monoid (Input a) where mempty = empty