exceptions 0.7 → 0.8
raw patch · 3 files changed
+6/−5 lines, 3 filesdep +transformers-compatPVP ok
version bump matches the API change (PVP)
Dependencies added: transformers-compat
API changes (from Hackage documentation)
Files
- CHANGELOG.markdown +4/−0
- exceptions.cabal +2/−1
- src/Control/Monad/Catch.hs +0/−4
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+0.8+---+* Use `transformers-compat` to allow support for `ExceptT` even on older `transformers` versions.+ 0.7 --- * `stm` support
exceptions.cabal view
@@ -1,6 +1,6 @@ name: exceptions category: Control, Exceptions, Monad-version: 0.7+version: 0.8 cabal-version: >= 1.8 license: BSD3 license-file: LICENSE@@ -36,6 +36,7 @@ base >= 4.3 && < 5, stm >= 2.2 && < 3, transformers >= 0.2 && < 0.5,+ transformers-compat >= 0.3 && < 0.5, mtl >= 2.0 && < 2.3 exposed-modules:
src/Control/Monad/Catch.hs view
@@ -92,9 +92,7 @@ import Control.Monad.Trans.List (ListT(..), runListT) import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT) import Control.Monad.Trans.Error (ErrorT(..), Error, runErrorT)-#if MIN_VERSION_transformers(0,4,0) import Control.Monad.Trans.Except (ExceptT(..), runExceptT)-#endif import Control.Monad.Trans.Cont (ContT) import Control.Monad.Trans.Identity import Control.Monad.Reader as Reader@@ -320,14 +318,12 @@ instance (Error e, MonadCatch m) => MonadCatch (ErrorT e m) where catch (ErrorT m) f = ErrorT $ catch m (runErrorT . f) -#if MIN_VERSION_transformers(0,4,0) -- | Throws exceptions into the base monad. instance MonadThrow m => MonadThrow (ExceptT e m) where throwM = lift . throwM -- | Catches exceptions from the base monad. instance MonadCatch m => MonadCatch (ExceptT e m) where catch (ExceptT m) f = ExceptT $ catch m (runExceptT . f)-#endif instance MonadThrow m => MonadThrow (ContT r m) where throwM = lift . throwM