MonadCatchIO-mtl-0.3.1.0: Monad-transformer version of the Control.Exception module
Safe HaskellNone
LanguageHaskell98

Control.Monad.CatchIO

Documentation

class MonadIO m => MonadCatchIO (m :: Type -> Type) where #

Methods

catch :: Exception e => m a -> (e -> m a) -> m a #

block :: m a -> m a #

unblock :: m a -> m a #

Instances

Instances details
MonadCatchIO IO 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => IO a -> (e -> IO a) -> IO a #

block :: IO a -> IO a #

unblock :: IO a -> IO a #

MonadCatchIO m => MonadCatchIO (ListT m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => ListT m a -> (e -> ListT m a) -> ListT m a #

block :: ListT m a -> ListT m a #

unblock :: ListT m a -> ListT m a #

MonadCatchIO m => MonadCatchIO (MaybeT m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a #

block :: MaybeT m a -> MaybeT m a #

unblock :: MaybeT m a -> MaybeT m a #

(MonadCatchIO m, Error e) => MonadCatchIO (ErrorT e m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e0 => ErrorT e m a -> (e0 -> ErrorT e m a) -> ErrorT e m a #

block :: ErrorT e m a -> ErrorT e m a #

unblock :: ErrorT e m a -> ErrorT e m a #

MonadCatchIO m => MonadCatchIO (IdentityT m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => IdentityT m a -> (e -> IdentityT m a) -> IdentityT m a #

block :: IdentityT m a -> IdentityT m a #

unblock :: IdentityT m a -> IdentityT m a #

MonadCatchIO m => MonadCatchIO (ReaderT r m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

block :: ReaderT r m a -> ReaderT r m a #

unblock :: ReaderT r m a -> ReaderT r m a #

MonadCatchIO m => MonadCatchIO (StateT s m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => StateT s m a -> (e -> StateT s m a) -> StateT s m a #

block :: StateT s m a -> StateT s m a #

unblock :: StateT s m a -> StateT s m a #

MonadCatchIO m => MonadCatchIO (StateT s m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => StateT s m a -> (e -> StateT s m a) -> StateT s m a #

block :: StateT s m a -> StateT s m a #

unblock :: StateT s m a -> StateT s m a #

(Monoid w, MonadCatchIO m) => MonadCatchIO (WriterT w m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

block :: WriterT w m a -> WriterT w m a #

unblock :: WriterT w m a -> WriterT w m a #

(Monoid w, MonadCatchIO m) => MonadCatchIO (WriterT w m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

block :: WriterT w m a -> WriterT w m a #

unblock :: WriterT w m a -> WriterT w m a #

MonadCatchIO m => MonadCatchIO (ContT r m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => ContT r m a -> (e -> ContT r m a) -> ContT r m a #

block :: ContT r m a -> ContT r m a #

unblock :: ContT r m a -> ContT r m a #

(Monoid w, MonadCatchIO m) => MonadCatchIO (RWST r w s m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a #

block :: RWST r w s m a -> RWST r w s m a #

unblock :: RWST r w s m a -> RWST r w s m a #

(Monoid w, MonadCatchIO m) => MonadCatchIO (RWST r w s m) 
Instance details

Defined in Control.Monad.CatchIO

Methods

catch :: Exception e => RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a #

block :: RWST r w s m a -> RWST r w s m a #

unblock :: RWST r w s m a -> RWST r w s m a #

class (Typeable e, Show e) => Exception e where #

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException #

fromException :: SomeException -> Maybe e #

displayException :: e -> String #

Instances

Instances details
Exception SomeException 
Instance details

Defined in GHC.Exception.Type

Methods

toException :: SomeException -> SomeException #

fromException :: SomeException -> Maybe SomeException #

displayException :: SomeException -> String #

Exception ArithException 
Instance details

Defined in GHC.Exception.Type

Methods

toException :: ArithException -> SomeException #

fromException :: SomeException -> Maybe ArithException #

displayException :: ArithException -> String #

Exception AllocationLimitExceeded 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: AllocationLimitExceeded -> SomeException #

fromException :: SomeException -> Maybe AllocationLimitExceeded #

displayException :: AllocationLimitExceeded -> String #

Exception ArrayException 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: ArrayException -> SomeException #

fromException :: SomeException -> Maybe ArrayException #

displayException :: ArrayException -> String #

Exception AssertionFailed 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: AssertionFailed -> SomeException #

fromException :: SomeException -> Maybe AssertionFailed #

displayException :: AssertionFailed -> String #

Exception AsyncException 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: AsyncException -> SomeException #

fromException :: SomeException -> Maybe AsyncException #

displayException :: AsyncException -> String #

Exception BlockedIndefinitelyOnMVar 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: BlockedIndefinitelyOnMVar -> SomeException #

fromException :: SomeException -> Maybe BlockedIndefinitelyOnMVar #

displayException :: BlockedIndefinitelyOnMVar -> String #

Exception BlockedIndefinitelyOnSTM 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: BlockedIndefinitelyOnSTM -> SomeException #

fromException :: SomeException -> Maybe BlockedIndefinitelyOnSTM #

displayException :: BlockedIndefinitelyOnSTM -> String #

Exception CompactionFailed 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: CompactionFailed -> SomeException #

fromException :: SomeException -> Maybe CompactionFailed #

displayException :: CompactionFailed -> String #

Exception Deadlock 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: Deadlock -> SomeException #

fromException :: SomeException -> Maybe Deadlock #

displayException :: Deadlock -> String #

Exception IOException 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: IOException -> SomeException #

fromException :: SomeException -> Maybe IOException #

displayException :: IOException -> String #

Exception SomeAsyncException 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: SomeAsyncException -> SomeException #

fromException :: SomeException -> Maybe SomeAsyncException #

displayException :: SomeAsyncException -> String #

Exception ExitCode 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: ExitCode -> SomeException #

fromException :: SomeException -> Maybe ExitCode #

displayException :: ExitCode -> String #

Exception FixIOException 
Instance details

Defined in GHC.IO.Exception

Methods

toException :: FixIOException -> SomeException #

fromException :: SomeException -> Maybe FixIOException #

displayException :: FixIOException -> String #

throw :: (MonadIO m, Exception e) => e -> m a #

try :: (MonadCatchIO m, Functor m, Exception e) => m a -> m (Either e a) #

tryJust :: (MonadCatchIO m, Functor m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a) #

onException :: MonadCatchIO m => m a -> m b -> m a #

bracket :: MonadCatchIO m => m a -> (a -> m b) -> (a -> m c) -> m c #

bracket_ :: MonadCatchIO m => m a -> m b -> m c -> m c #

finally :: MonadCatchIO m => m a -> m b -> m a #

bracketOnError :: MonadCatchIO m => m a -> (a -> m b) -> (a -> m c) -> m c #

data Handler (m :: Type -> Type) a #

Constructors

Exception e => Handler (e -> m a) 

catches :: MonadCatchIO m => m a -> [Handler m a] -> m a #