MonadCatchIO-mtl-0.2.0.0: Monad-transformer version of the Control.Exception moduleSource codeContentsIndex
Control.Monad.CatchIO
Synopsis
class MonadIO m => MonadCatchIO m where
catch :: Exception e => m a -> (e -> m a) -> m a
block :: m a -> m a
unblock :: m a -> m a
Exception (toException, fromException)
throw :: (MonadCatchIO m, Exception e) => e -> m a
try :: (MonadCatchIO m, Exception e) => m a -> m (Either e a)
tryJust :: (MonadCatchIO 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
data Handler m a = forall e . Exception e => Handler (e -> m a)
catches :: MonadCatchIO m => m a -> [Handler m a] -> m a
Documentation
class MonadIO m => MonadCatchIO m whereSource
Methods
catch :: Exception e => m a -> (e -> m a) -> m aSource
Generalized version of catch
block :: m a -> m aSource
Generalized version of block
unblock :: m a -> m aSource
Generalized version of unblock
show/hide Instances
Exception (toException, fromException)
throw :: (MonadCatchIO m, Exception e) => e -> m aSource
Generalized version of throwIO
try :: (MonadCatchIO m, Exception e) => m a -> m (Either e a)Source
Generalized version of try
tryJust :: (MonadCatchIO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)Source
Generalized version of tryJust
onException :: MonadCatchIO m => m a -> m b -> m aSource
Generalized version of onException
bracket :: MonadCatchIO m => m a -> (a -> m b) -> (a -> m c) -> m cSource
Generalized version of bracket
data Handler m a Source
Generalized version of Handler
Constructors
forall e . Exception e => Handler (e -> m a)
catches :: MonadCatchIO m => m a -> [Handler m a] -> m aSource
Generalized version of catches
Produced by Haddock version 2.4.2