freckle-app-1.15.2.0: Haskell application toolkit used at Freckle
Safe HaskellSafe-Inferred
LanguageHaskell2010

Freckle.App.Exception.MonadThrow

Contents

Synopsis

Documentation

throwM :: forall e m a. (Exception e, MonadThrow m, HasCallStack) => e -> m a Source #

throwString :: forall m a. (MonadThrow m, HasCallStack) => String -> m a Source #

fromJustNoteM :: forall m a. (MonadThrow m, HasCallStack) => String -> Maybe a -> m a Source #

impossible :: forall m a. (MonadThrow m, HasCallStack) => m a Source #

catch :: forall e m a. (Exception e, MonadCatch m, HasCallStack) => m a -> (e -> m a) -> m a Source #

catchJust :: forall e b m a. (Exception e, MonadCatch m, HasCallStack) => (e -> Maybe b) -> m a -> (b -> m a) -> m a Source #

catches Source #

Arguments

:: forall m a. (MonadCatch m, HasCallStack) 
=> m a

Action to run

-> [ExceptionHandler m a]

Recovery actions to run if the first action throws an exception with a type of either e or AnnotatedException e

-> m a 

try Source #

Arguments

:: forall e m a. (Exception e, MonadCatch m, HasCallStack) 
=> m a

Action to run

-> m (Either e a)

Returns Left if the action throws an exception with a type of either e or AnnotatedException e

tryJust Source #

Arguments

:: forall e b m a. (Exception e, MonadCatch m, HasCallStack) 
=> (e -> Maybe b) 
-> m a

Action to run

-> m (Either b a) 

withException :: forall e a m b. (Exception e, MonadCatch m, HasCallStack) => m a -> (e -> m b) -> m a Source #

checkpoint :: (HasCallStack, MonadCatch m) => Annotation -> m a -> m a #

Add a single Annotation to any exceptions thrown in the following action. The CallStack present on any AnnotatedException will also be updated to include this location.

Example:

main = do
    checkpoint "Foo" $ do
        print =<< readFile "I don't exist.markdown"

The exception thrown due to a missing file will now have an Annotation Foo.

Since: annotated-exception-0.1.0.0

checkpointMany :: (MonadCatch m, HasCallStack) => [Annotation] -> m a -> m a #

Add the list of Annotation to any exception thrown in the following action.

Since: annotated-exception-0.1.0.0

checkpointCallStack Source #

Arguments

:: forall m a. (MonadCatch m, HasCallStack) 
=> m a

Action that might throw whatever types of exceptions

-> m a

Action that only throws AnnotatedException, where the annotations include a call stack

When dealing with a library that does not use AnnotatedException, apply this function to augment its exceptions with call stacks.

Miscellany

class Monad m => MonadThrow (m :: Type -> Type) #

A class for monads in which exceptions may be thrown.

Instances should obey the following law:

throwM e >> x = throwM e

In other words, throwing an exception short-circuits the rest of the monadic computation.

Minimal complete definition

throwM

Instances

Instances details
MonadThrow STM 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> STM a #

MonadThrow IO 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> IO a #

MonadThrow Q 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> Q a #

MonadThrow Maybe 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> Maybe a #

MonadThrow List 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> [a] #

e ~ SomeException => MonadThrow (Either e) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e0) => e0 -> Either e a #

MonadThrow (ST s) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> ST s a #

MonadThrow (AppExample app) Source # 
Instance details

Defined in Freckle.App.Test

Methods

throwM :: (HasCallStack, Exception e) => e -> AppExample app a #

MonadThrow m => MonadThrow (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

throwM :: (HasCallStack, Exception e) => e -> LoggingT m a #

MonadThrow m => MonadThrow (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

throwM :: (HasCallStack, Exception e) => e -> NoLoggingT m a #

MonadThrow m => MonadThrow (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

throwM :: (HasCallStack, Exception e) => e -> WriterLoggingT m a #

MonadThrow m => MonadThrow (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

throwM :: (HasCallStack, Exception e) => e -> ResourceT m a #

MonadThrow m => MonadThrow (MaybeT m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> MaybeT m a #

MonadThrow (HandlerFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> HandlerFor site a #

MonadThrow (WidgetFor site) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> WidgetFor site a #

MonadThrow (SIO s) 
Instance details

Defined in Yesod.Test.Internal.SIO

Methods

throwM :: (HasCallStack, Exception e) => e -> SIO s a #

MonadThrow m => MonadThrow (AppT app m) Source # 
Instance details

Defined in Freckle.App

Methods

throwM :: (HasCallStack, Exception e) => e -> AppT app m a #

(Functor f, MonadThrow m) => MonadThrow (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

throwM :: (HasCallStack, Exception e) => e -> FreeT f m a #

MonadThrow m => MonadThrow (ValidateT e m) 
Instance details

Defined in Control.Monad.Validate.Internal

Methods

throwM :: (HasCallStack, Exception e0) => e0 -> ValidateT e m a #

MonadThrow m => MonadThrow (ExceptT e m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e0) => e0 -> ExceptT e m a #

MonadThrow m => MonadThrow (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> IdentityT m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> ReaderT r m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> StateT s m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> StateT s m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> WriterT w m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> WriterT w m a #

MonadThrow (SubHandlerFor child master) 
Instance details

Defined in Yesod.Core.Types

Methods

throwM :: (HasCallStack, Exception e) => e -> SubHandlerFor child master a #

MonadThrow m => MonadThrow (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

throwM :: (HasCallStack, Exception e) => e -> ConduitT i o m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> ContT r m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> RWST r w s m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: (HasCallStack, Exception e) => e -> RWST r w s m a #

MonadThrow m => MonadThrow (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

throwM :: (HasCallStack, Exception e) => e -> Pipe l i o u m a #

class MonadThrow m => MonadCatch (m :: Type -> Type) #

A class for monads which allow exceptions to be caught, in particular exceptions which were thrown by throwM.

Instances should obey the following law:

catch (throwM e) f = f e

Note that the ability to catch an exception does not guarantee that we can deal with all possible exit points from a computation. Some monads, such as continuation-based stacks, allow for more than just a success/failure strategy, and therefore catch cannot be used by those monads to properly implement a function such as finally. For more information, see MonadMask.

Minimal complete definition

catch

Instances

Instances details
MonadCatch STM 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: (HasCallStack, Exception e) => STM a -> (e -> STM a) -> STM a #

MonadCatch IO 
Instance details

Defined in Control.Monad.Catch

Methods

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

e ~ SomeException => MonadCatch (Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

catch :: (HasCallStack, Exception e0) => Either e a -> (e0 -> Either e a) -> Either e a #

MonadCatch (AppExample app) Source # 
Instance details

Defined in Freckle.App.Test

Methods

catch :: (HasCallStack, Exception e) => AppExample app a -> (e -> AppExample app a) -> AppExample app a #

MonadCatch m => MonadCatch (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

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

MonadCatch m => MonadCatch (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

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

MonadCatch m => MonadCatch (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

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

MonadCatch m => MonadCatch (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

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

MonadCatch m => MonadCatch (MaybeT m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

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

MonadCatch m => MonadCatch (AppT app m) Source # 
Instance details

Defined in Freckle.App

Methods

catch :: (HasCallStack, Exception e) => AppT app m a -> (e -> AppT app m a) -> AppT app m a #

(Functor f, MonadCatch m) => MonadCatch (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

catch :: (HasCallStack, Exception e) => FreeT f m a -> (e -> FreeT f m a) -> FreeT f m a #

MonadCatch m => MonadCatch (ValidateT e m) 
Instance details

Defined in Control.Monad.Validate.Internal

Methods

catch :: (HasCallStack, Exception e0) => ValidateT e m a -> (e0 -> ValidateT e m a) -> ValidateT e m a #

MonadCatch m => MonadCatch (ExceptT e m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

catch :: (HasCallStack, Exception e0) => ExceptT e m a -> (e0 -> ExceptT e m a) -> ExceptT e m a #

MonadCatch m => MonadCatch (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

class MonadCatch m => MonadMask (m :: Type -> Type) #

A class for monads which provide for the ability to account for all possible exit points from a computation, and to mask asynchronous exceptions. Continuation-based monads are invalid instances of this class.

Instances should ensure that, in the following code:

fg = f `finally` g

The action g is called regardless of what occurs within f, including async exceptions. Some monads allow f to abort the computation via other effects than throwing an exception. For simplicity, we will consider aborting and throwing an exception to be two forms of "throwing an error".

If f and g both throw an error, the error thrown by fg depends on which errors we're talking about. In a monad transformer stack, the deeper layers override the effects of the inner layers; for example, ExceptT e1 (Except e2) a represents a value of type Either e2 (Either e1 a), so throwing both an e1 and an e2 will result in Left e2. If f and g both throw an error from the same layer, instances should ensure that the error from g wins.

Effects other than throwing an error are also overridden by the deeper layers. For example, StateT s Maybe a represents a value of type s -> Maybe (a, s), so if an error thrown from f causes this function to return Nothing, any changes to the state which f also performed will be erased. As a result, g will see the state as it was before f. Once g completes, f's error will be rethrown, so g' state changes will be erased as well. This is the normal interaction between effects in a monad transformer stack.

By contrast, lifted-base's version of finally always discards all of g's non-IO effects, and g never sees any of f's non-IO effects, regardless of the layer ordering and regardless of whether f throws an error. This is not the result of interacting effects, but a consequence of MonadBaseControl's approach.

Minimal complete definition

mask, uninterruptibleMask, generalBracket

Instances

Instances details
MonadMask IO 
Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. IO a -> IO a) -> IO b) -> IO b #

uninterruptibleMask :: HasCallStack => ((forall a. IO a -> IO a) -> IO b) -> IO b #

generalBracket :: HasCallStack => IO a -> (a -> ExitCase b -> IO c) -> (a -> IO b) -> IO (b, c) #

e ~ SomeException => MonadMask (Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b #

uninterruptibleMask :: HasCallStack => ((forall a. Either e a -> Either e a) -> Either e b) -> Either e b #

generalBracket :: HasCallStack => Either e a -> (a -> ExitCase b -> Either e c) -> (a -> Either e b) -> Either e (b, c) #

MonadMask (AppExample app) Source # 
Instance details

Defined in Freckle.App.Test

Methods

mask :: HasCallStack => ((forall a. AppExample app a -> AppExample app a) -> AppExample app b) -> AppExample app b #

uninterruptibleMask :: HasCallStack => ((forall a. AppExample app a -> AppExample app a) -> AppExample app b) -> AppExample app b #

generalBracket :: HasCallStack => AppExample app a -> (a -> ExitCase b -> AppExample app c) -> (a -> AppExample app b) -> AppExample app (b, c) #

MonadMask m => MonadMask (LoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

mask :: HasCallStack => ((forall a. LoggingT m a -> LoggingT m a) -> LoggingT m b) -> LoggingT m b #

uninterruptibleMask :: HasCallStack => ((forall a. LoggingT m a -> LoggingT m a) -> LoggingT m b) -> LoggingT m b #

generalBracket :: HasCallStack => LoggingT m a -> (a -> ExitCase b -> LoggingT m c) -> (a -> LoggingT m b) -> LoggingT m (b, c) #

MonadMask m => MonadMask (NoLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

mask :: HasCallStack => ((forall a. NoLoggingT m a -> NoLoggingT m a) -> NoLoggingT m b) -> NoLoggingT m b #

uninterruptibleMask :: HasCallStack => ((forall a. NoLoggingT m a -> NoLoggingT m a) -> NoLoggingT m b) -> NoLoggingT m b #

generalBracket :: HasCallStack => NoLoggingT m a -> (a -> ExitCase b -> NoLoggingT m c) -> (a -> NoLoggingT m b) -> NoLoggingT m (b, c) #

MonadMask m => MonadMask (WriterLoggingT m) 
Instance details

Defined in Control.Monad.Logger

Methods

mask :: HasCallStack => ((forall a. WriterLoggingT m a -> WriterLoggingT m a) -> WriterLoggingT m b) -> WriterLoggingT m b #

uninterruptibleMask :: HasCallStack => ((forall a. WriterLoggingT m a -> WriterLoggingT m a) -> WriterLoggingT m b) -> WriterLoggingT m b #

generalBracket :: HasCallStack => WriterLoggingT m a -> (a -> ExitCase b -> WriterLoggingT m c) -> (a -> WriterLoggingT m b) -> WriterLoggingT m (b, c) #

MonadMask m => MonadMask (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

mask :: HasCallStack => ((forall a. ResourceT m a -> ResourceT m a) -> ResourceT m b) -> ResourceT m b #

uninterruptibleMask :: HasCallStack => ((forall a. ResourceT m a -> ResourceT m a) -> ResourceT m b) -> ResourceT m b #

generalBracket :: HasCallStack => ResourceT m a -> (a -> ExitCase b -> ResourceT m c) -> (a -> ResourceT m b) -> ResourceT m (b, c) #

MonadMask m => MonadMask (MaybeT m)

Since: exceptions-0.10.0

Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. MaybeT m a -> MaybeT m a) -> MaybeT m b) -> MaybeT m b #

uninterruptibleMask :: HasCallStack => ((forall a. MaybeT m a -> MaybeT m a) -> MaybeT m b) -> MaybeT m b #

generalBracket :: HasCallStack => MaybeT m a -> (a -> ExitCase b -> MaybeT m c) -> (a -> MaybeT m b) -> MaybeT m (b, c) #

MonadMask m => MonadMask (AppT app m) Source # 
Instance details

Defined in Freckle.App

Methods

mask :: HasCallStack => ((forall a. AppT app m a -> AppT app m a) -> AppT app m b) -> AppT app m b #

uninterruptibleMask :: HasCallStack => ((forall a. AppT app m a -> AppT app m a) -> AppT app m b) -> AppT app m b #

generalBracket :: HasCallStack => AppT app m a -> (a -> ExitCase b -> AppT app m c) -> (a -> AppT app m b) -> AppT app m (b, c) #

MonadMask m => MonadMask (ValidateT e m) 
Instance details

Defined in Control.Monad.Validate.Internal

Methods

mask :: HasCallStack => ((forall a. ValidateT e m a -> ValidateT e m a) -> ValidateT e m b) -> ValidateT e m b #

uninterruptibleMask :: HasCallStack => ((forall a. ValidateT e m a -> ValidateT e m a) -> ValidateT e m b) -> ValidateT e m b #

generalBracket :: HasCallStack => ValidateT e m a -> (a -> ExitCase b -> ValidateT e m c) -> (a -> ValidateT e m b) -> ValidateT e m (b, c) #

MonadMask m => MonadMask (ExceptT e m)

Since: exceptions-0.9.0

Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. ExceptT e m a -> ExceptT e m a) -> ExceptT e m b) -> ExceptT e m b #

uninterruptibleMask :: HasCallStack => ((forall a. ExceptT e m a -> ExceptT e m a) -> ExceptT e m b) -> ExceptT e m b #

generalBracket :: HasCallStack => ExceptT e m a -> (a -> ExitCase b -> ExceptT e m c) -> (a -> ExceptT e m b) -> ExceptT e m (b, c) #

MonadMask m => MonadMask (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. IdentityT m a -> IdentityT m a) -> IdentityT m b) -> IdentityT m b #

uninterruptibleMask :: HasCallStack => ((forall a. IdentityT m a -> IdentityT m a) -> IdentityT m b) -> IdentityT m b #

generalBracket :: HasCallStack => IdentityT m a -> (a -> ExitCase b -> IdentityT m c) -> (a -> IdentityT m b) -> IdentityT m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

uninterruptibleMask :: HasCallStack => ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

generalBracket :: HasCallStack => ReaderT r m a -> (a -> ExitCase b -> ReaderT r m c) -> (a -> ReaderT r m b) -> ReaderT r m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b #

uninterruptibleMask :: HasCallStack => ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b #

generalBracket :: HasCallStack => StateT s m a -> (a -> ExitCase b -> StateT s m c) -> (a -> StateT s m b) -> StateT s m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b #

uninterruptibleMask :: HasCallStack => ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b #

generalBracket :: HasCallStack => StateT s m a -> (a -> ExitCase b -> StateT s m c) -> (a -> StateT s m b) -> StateT s m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b #

uninterruptibleMask :: HasCallStack => ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b #

generalBracket :: HasCallStack => WriterT w m a -> (a -> ExitCase b -> WriterT w m c) -> (a -> WriterT w m b) -> WriterT w m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b #

uninterruptibleMask :: HasCallStack => ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b #

generalBracket :: HasCallStack => WriterT w m a -> (a -> ExitCase b -> WriterT w m c) -> (a -> WriterT w m b) -> WriterT w m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b #

uninterruptibleMask :: HasCallStack => ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b #

generalBracket :: HasCallStack => RWST r w s m a -> (a -> ExitCase b -> RWST r w s m c) -> (a -> RWST r w s m b) -> RWST r w s m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: HasCallStack => ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b #

uninterruptibleMask :: HasCallStack => ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b #

generalBracket :: HasCallStack => RWST r w s m a -> (a -> ExitCase b -> RWST r w s m c) -> (a -> RWST r w s m b) -> RWST r w s m (b, c) #