checked-exceptions
Safe HaskellNone
LanguageGHC2021

Control.Monad.CheckedExcept.QualifiedDo

Description

do blocks for CheckedExceptT that compose exceptions.

Requires -fplugin Control.Monad.CheckedExcept.Plugin so ambiguous exception-list metavariables (e.g. from pure / return in a block) can default to '[] or a Nub union of accumulated bounds.

Synopsis

Documentation

(>>=) :: forall (exceptions1 :: [Type]) (exceptions2 :: [Type]) (m :: Type -> Type) a b. (Contains exceptions1 (UnionExceptions exceptions1 exceptions2), Contains exceptions2 (UnionExceptions exceptions1 exceptions2), Monad m) => CheckedExceptT exceptions1 m a -> (a -> CheckedExceptT exceptions2 m b) -> CheckedExceptT (UnionExceptions exceptions1 exceptions2) m b Source #

(>>) :: forall (exceptions1 :: [Type]) (exceptions2 :: [Type]) (m :: Type -> Type) a x. (Contains exceptions1 (UnionExceptions exceptions1 exceptions2), Contains exceptions2 (UnionExceptions exceptions1 exceptions2), Monad m) => CheckedExceptT exceptions1 m x -> CheckedExceptT exceptions2 m a -> CheckedExceptT (UnionExceptions exceptions1 exceptions2) m a Source #

pure :: forall (m :: Type -> Type) a (es :: [Type]). Monad m => a -> CheckedExceptT es m a Source #

Leaves es free; empty 'do' blocks need the type-checker plugin to default es (see module header).

return :: forall (m :: Type -> Type) a (es :: [Type]). Monad m => a -> CheckedExceptT es m a Source #

Same caveat as pure.

fail :: forall (m :: Type -> Type) (es :: [Type]) a. MonadFail m => String -> CheckedExceptT es m a Source #