monad-abort-fd-0.2: A better error monad transformer

Control.Monad.Exception

Documentation

exception :: Exception e => e -> αSource

evaluate :: MonadBase μ IO => α -> μ αSource

throwIO :: (MonadBase μ IO, Exception e) => e -> μ αSource

catch :: (MonadRecover SomeException μ, Exception e) => μ α -> (e -> μ α) -> μ αSource

catchJust :: (MonadRecover SomeException μ, Exception e) => (e -> Maybe β) -> μ α -> (β -> μ α) -> μ αSource

handle :: (MonadRecover SomeException μ, Exception e) => (e -> μ α) -> μ α -> μ αSource

handleJust :: (MonadRecover SomeException μ, Exception e) => (e -> Maybe β) -> (β -> μ α) -> μ α -> μ αSource

data Handler μ α Source

Constructors

forall e . Exception e => Handler (e -> μ α) 

catches :: MonadRecover SomeException μ => μ α -> [Handler μ α] -> μ αSource

try :: (MonadRecover SomeException μ, Exception e) => μ α -> μ (Either e α)Source

tryJust :: (MonadRecover SomeException μ, Exception e) => (e -> Maybe β) -> μ α -> μ (Either β α)Source

onException :: (MonadRecover SomeException μ, Exception e) => μ α -> (e -> μ β) -> μ αSource

onExceptions :: MonadRecover SomeException μ => μ α -> [Handler μ β] -> μ αSource

class (Applicative μ, Monad μ) => MonadFinally μ whereSource

Methods

finally' :: μ α -> (Maybe α -> μ β) -> μ (α, β)Source

finally :: μ α -> μ β -> μ αSource

onEscape :: MonadFinally μ => μ α -> μ β -> μ αSource

tryAll :: MonadFinally μ => [μ α] -> μ ()Source

class (Applicative μ, Monad μ, Ord m, Bounded m, Default m) => MonadMask m μ | μ -> m whereSource

Methods

getMaskingState :: μ mSource

setMaskingState :: m -> μ α -> μ αSource

Instances

MonadMask () Identity 
MonadMask MaskingState IO 
MonadMask m μ => MonadMask m (ListT μ) 
MonadMask m μ => MonadMask m (MaybeT μ) 
(MonadMask m μ, Monoid w) => MonadMask m (WriterT w μ) 
(MonadMask m μ, Monoid w) => MonadMask m (WriterT w μ) 
MonadMask m μ => MonadMask m (StateT s μ) 
MonadMask m μ => MonadMask m (StateT s μ) 
MonadMask m μ => MonadMask m (ReaderT r μ) 
(MonadMask m μ, Error e) => MonadMask m (ErrorT e μ) 
MonadMask m μ => MonadMask m (FinishT β μ) 
MonadMask m μ => MonadMask m (AbortT e μ) 
(MonadMask m μ, Monoid w) => MonadMask m (RWST r w s μ) 
(MonadMask m μ, Monoid w) => MonadMask m (RWST r w s μ) 

mask :: MonadMask m μ => ((forall η β. MonadMask m η => η β -> η β) -> μ α) -> μ αSource

mask_ :: MonadMask m μ => μ α -> μ αSource

uninterruptibleMask :: MonadMask MaskingState μ => ((forall η β. MonadMask MaskingState η => η β -> η β) -> μ α) -> μ αSource

bracket :: (MonadFinally μ, MonadMask m μ) => μ α -> (α -> μ β) -> (α -> μ γ) -> μ γSource

bracket_ :: (MonadFinally μ, MonadMask m μ) => μ α -> μ β -> μ γ -> μ γSource

bracketOnEscape :: (MonadFinally μ, MonadMask m μ) => μ α -> (α -> μ β) -> (α -> μ γ) -> μ γSource

bracketOnError :: (MonadRecover e μ, MonadMask m μ) => μ α -> (α -> μ β) -> (α -> μ γ) -> μ γSource