packages feed

enumerator 0.4.0.2 → 0.4.1

raw patch · 2 files changed

+18/−6 lines, 2 filesdep +MonadCatchIO-transformersdep ~extensible-exceptionsPVP ok

version bump matches the API change (PVP)

Dependencies added: MonadCatchIO-transformers

Dependency ranges changed: extensible-exceptions

API changes (from Hackage documentation)

+ Data.Enumerator: instance (MonadCatchIO m) => MonadCatchIO (Iteratee a m)

Files

enumerator.cabal view
@@ -1,5 +1,5 @@ name: enumerator-version: 0.4.0.2+version: 0.4.1 synopsis: Implementation of Oleg Kiselyov's left-fold enumerators license: MIT license-file: license.txt@@ -10,7 +10,7 @@ cabal-version: >=1.6 category: Data, Enumerator stability: experimental-homepage: http://ianen.org/haskell/enumerator/+homepage: http://john-millikin.com/software/enumerator/ bug-reports: mailto:jmillikin@gmail.com tested-with: GHC==6.12.1 @@ -23,7 +23,7 @@  source-repository head   type: darcs-  location: http://ianen.org/haskell/enumerator/+  location: http://john-millikin.com/software/enumerator/  library   ghc-options: -Wall -fno-warn-unused-do-bind@@ -33,14 +33,15 @@       transformers >= 0.2 && < 0.3     , bytestring >= 0.9 && < 0.10     , text >= 0.7 && < 0.10+    , MonadCatchIO-transformers >= 0.0 && < 0.3    if impl(ghc >= 6.10)     build-depends:-        base >=4 && < 5+        base >= 4 && < 5   else     build-depends:-        base >=3 && < 4-      , extensible-exceptions+        base >= 3 && < 4+      , extensible-exceptions >= 0.1 && < 0.2    exposed-modules:     Data.Enumerator
hs/Data/Enumerator.hs view
@@ -72,6 +72,7 @@ import Control.Monad (liftM, ap) import qualified Control.Monad.IO.Class as MIO import qualified Control.Monad.Trans.Class as MT+import qualified Control.Monad.CatchIO as CatchIO import qualified Data.List as DataList import Control.Monad (foldM) import Prelude hiding (span)@@ -174,6 +175,16 @@ instance MIO.MonadIO m => MIO.MonadIO (Iteratee a m) where 	liftIO = MT.lift . MIO.liftIO 	{-# INLINE liftIO #-}++instance CatchIO.MonadCatchIO m => CatchIO.MonadCatchIO (Iteratee a m) where+	catch m f = Iteratee (CatchIO.catch (runIteratee m) (runIteratee . f))+	{-# INLINE catch #-}+	+	block = Iteratee . CatchIO.block . runIteratee+	{-# INLINE block #-}+	+	unblock = Iteratee . CatchIO.unblock . runIteratee+	{-# INLINE unblock #-} -- | Lift an 'Iteratee' onto a monad transformer, re-wrapping the -- 'Iteratee'&#x2019;s inner monadic values. liftTrans :: (Monad m, MT.MonadTrans t, Monad (t m)) =>