packages feed

exceptions 0.4 → 0.5

raw patch · 2 files changed

+15/−1 lines, 2 files

Files

exceptions.cabal view
@@ -1,6 +1,6 @@ name:          exceptions category:      Control, Exceptions, Monad-version:       0.4+version:       0.5 cabal-version: >= 1.8 license:       BSD3 license-file:  LICENSE
src/Control/Monad/Catch.hs view
@@ -86,6 +86,10 @@ import qualified Control.Monad.Trans.State.Strict as StrictS import qualified Control.Monad.Trans.Writer.Lazy as LazyW import qualified Control.Monad.Trans.Writer.Strict as StrictW+import Control.Monad.Trans.List (ListT)+import Control.Monad.Trans.Maybe (MaybeT)+import Control.Monad.Trans.Error (ErrorT, Error)+import Control.Monad.Trans.Cont (ContT) import Control.Monad.Trans.Identity import Control.Monad.Reader as Reader import Control.Monad.RWS@@ -220,6 +224,16 @@   uninterruptibleMask a =     StrictRWS.RWST $ \r s -> uninterruptibleMask $ \u -> StrictRWS.runRWST (a $ q u) r s       where q u (StrictRWS.RWST b) = StrictRWS.RWST $ \ r s -> u (b r s)++-- Transformers which are only instances of MonadThrow, not MonadCatch+instance MonadThrow m => MonadThrow (ListT m) where+  throwM = lift . throwM+instance MonadThrow m => MonadThrow (MaybeT m) where+  throwM = lift . throwM+instance (Error e, MonadThrow m) => MonadThrow (ErrorT e m) where+  throwM = lift . throwM+instance MonadThrow m => MonadThrow (ContT r m) where+  throwM = lift . throwM  ------------------------------------------------------------------------------ -- $utilities