in-other-words-0.2.0.0: A higher-order effect system where the sky's the limit
Safe HaskellNone
LanguageHaskell2010

Control.Effect.Error

Synopsis

Effects

newtype Throw e (m :: * -> *) (a :: *) where Source #

An effect for throwing exceptions of type e.

Constructors

Throw :: e -> Throw e m a 

Instances

Instances details
(Eff ErrorIO m, Exception e) => Handler ErrorToErrorIOAsExcH (Throw e) m Source # 
Instance details

Defined in Control.Effect.Internal.Error

data Catch e :: Effect where Source #

An effect for catching exceptions of type e.

Constructors

Catch :: m a -> (e -> m a) -> Catch e m a 

Instances

Instances details
(Eff ErrorIO m, Exception e) => Handler ErrorToErrorIOAsExcH (Catch e) m Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Error e = Bundle '[Throw e, Catch e] Source #

A pseudo-effect for connected Throw e and Catch e effects.

Error e should only ever be used inside of Eff and Effs constraints. It is not a real effect! See Bundle.

Actions

throw :: Eff (Throw e) m => e -> m a Source #

catch :: Eff (Catch e) m => m a -> (e -> m a) -> m a Source #

try :: Eff (Catch e) m => m a -> m (Either e a) Source #

catchJust :: forall smallExc bigExc m a. Eff (Error bigExc) m => (bigExc -> Maybe smallExc) -> m a -> (smallExc -> m a) -> m a Source #

tryJust :: forall smallExc bigExc m a. Eff (Error bigExc) m => (bigExc -> Maybe smallExc) -> m a -> m (Either smallExc a) Source #

note :: Eff (Throw e) m => e -> Maybe a -> m a Source #

fromEither :: Eff (Throw e) m => Either e a -> m a Source #

Main Interpreters

runThrow :: forall e m a p. (Carrier m, Threaders '[ErrorThreads] m p) => ThrowC e m a -> m (Either e a) Source #

Run a Throw effect purely.

Unlike runError, this does not provide the ability to catch exceptions. However, it also doesn't impose any primitive effects, meaning runThrow doesn't restrict what interpreters are run before it.

Derivs (ThrowC e m) = Throw e ': Derivs m
Prims  (ThrowC e m) = Prims m

runError :: forall e m a p. (Carrier m, Threaders '[ErrorThreads] m p) => ErrorC e m a -> m (Either e a) Source #

Runs connected Throw and Catch effects -- i.e. Error -- purely.

Derivs (ErrorC e m) = Catch e ': Throw e ': Derivs m
Prims  (ErrorC e m) = Optional ((->) e) ': Prims m

errorToIO :: forall e m a. (MonadCatch m, Eff (Embed IO) m) => ErrorToIOC e m a -> m (Either e a) Source #

Runs connected Throw and Catch effects -- i.e. Error -- by making use of IO exceptions.

Derivs (ErrorToIOC e m) = Catch e ': Throw e ': Derivs m
Prims  (ErrorToIOC e m) = Optional ((->) SomeException) ': Prims m

This has a higher-rank type, as it makes use of ErrorToIOC. This makes errorToIO very difficult to use partially applied. In particular, it can't be composed using ..

If performance is secondary, consider using the slower errorToIOSimple, which doesn't have a higher-rank type.

errorToIOAsExc :: (Exception e, MonadCatch m, Carrier m) => ErrorToIOAsExcC e m a -> m a Source #

Runs connected Throw and Catch effects -- i.e. Error -- by treating values of e as IO exceptions.

Unlike errorToIO, values of e are thrown and caught directly as IO exceptions. This means that, for example, catchIO is able to catch exceptions of e that you throw with throw, and catch is able to catch exceptions of type e that are thrown with throwIO, or by embedded IO actions.

Derivs (ErrorToIOAsExcC e m) = Catch e ': Throw e ': Derivs m
Prims (ErrorToIOAsExcC e m) = Optional ((->) SomeException) ': Prims m

Since: 0.2.0.0

Other interpreters

errorToErrorIO :: forall e m a. Effs '[ErrorIO, Embed IO] m => InterpretErrorC e m a -> m (Either e a) Source #

Runs connected Throw and Catch effects -- i.e. Error -- by transforming them into ErrorIO and Embed IO

This has a higher-rank type, as it makes use of InterpretErrorC. This makes errorToErrorIO very difficult to use partially applied. In particular, it can't be composed using ..

If performance is secondary, consider using the slower errorToErrorIOSimple, which doesn't have a higher-rank type.

errorToErrorIOAsExc :: (Exception e, Eff ErrorIO m) => ErrorToErrorIOAsExcC e m a -> m a Source #

Runs connected Throw and Catch effects -- i.e. Error -- by transforming them into ErrorIO.

Unlike errorToErrorIO, values of e are thrown and caught directly as IO exceptions. This means that, for example, catchIO is able to catch exceptions of e that you throw with throw, and catch is able to catch exceptions of type e that are thrown with throwIO, or by embedded IO actions.

Derivs (ErrorToErrorIOAsExcC e m) = Catch e ': Throw e ': Derivs m
Prims (ErrorToErrorIOAsExcC e m) = Prims m

Since: 0.2.0.0

throwToThrow :: forall smallExc bigExc m a. Eff (Throw bigExc) m => (smallExc -> bigExc) -> InterpretReifiedC (Throw smallExc) m a -> m a Source #

Transforms a Throw smallExc effect into a Throw bigExc effect, by providing a function to convert exceptions of the smaller exception type smallExc to the larger exception type bigExc.

This has a higher-rank type, as it makes use of InterpretReifiedC. This makes throwToThrow very difficult to use partially applied. In particular, it can't be composed using ..

If performance is secondary, consider using the slower throwToThrowSimple, which doesn't have a higher-rank type.

catchToError :: forall smallExc bigExc m a. Eff (Error bigExc) m => (bigExc -> Maybe smallExc) -> InterpretReifiedC (Catch smallExc) m a -> m a Source #

Transforms a Catch smallExc effect into an Error bigExc effect, by providing a function that identifies when exceptions of the larger exception type bigExc correspond to exceptions of the smaller exception type smallExc.

This has a higher-rank type, as it makes use of InterpretReifiedC. This makes catchToError very difficult to use partially applied. In particular, it can't be composed using ..

If performance is secondary, consider using the slower catchToErrorSimple, which doesn't have a higher-rank type.

errorToError :: forall smallExc bigExc m a. Eff (Error bigExc) m => (smallExc -> bigExc) -> (bigExc -> Maybe smallExc) -> InterpretErrorC smallExc m a -> m a Source #

Transforms connected Throw and Catch effects -- i.e. Error -- into another Error effect by providing functions to convert between the two types of exceptions.

This has a higher-rank type, as it makes use of InterpretErrorC. This makes errorToError very difficult to use partially applied. In particular, it can't be composed using ..

If performance is secondary, consider using the slower errorToErrorSimple, which doesn't have a higher-rank type.

Simple variants

errorToIOSimple :: forall e m a p. (Eff (Embed IO) m, MonadCatch m, Threaders '[ReaderThreads] m p) => ErrorToIOSimpleC e m a -> m (Either e a) Source #

Runs connected Throw and Catch effects -- i.e. Error -- by making use of IO exceptions.

Derivs (ErrorToIOSimpleC e m) = Catch e ': Throw e ': Derivs m
Prims  (ErrorToIOSimpleC e m) = Optional ((->) SomeException) ': Prims m

This is a less performant version of errorToIO that doesn't have a higher-rank type, making it much easier to use partially applied.

errorToErrorIOSimple :: forall e m a p. (Effs '[ErrorIO, Embed IO] m, Threaders '[ReaderThreads] m p) => InterpretErrorSimpleC e m a -> m (Either e a) Source #

Runs connected Throw and Catch effects -- i.e. Error -- by transforming them into ErrorIO and Embed IO

This is a less performant version of errorToErrorIO that doesn't have a higher-rank type, making it much easier to use partially applied.

throwToThrowSimple :: forall smallExc bigExc m a p. (Eff (Throw bigExc) m, Threaders '[ReaderThreads] m p) => (smallExc -> bigExc) -> InterpretSimpleC (Throw smallExc) m a -> m a Source #

Transforms a Throw smallExc effect into a Throw bigExc effect, by providing a function to convert exceptions of the smaller exception type smallExc to the larger exception type bigExc.

This is a less performant version of throwToThrow that doesn't have a higher-rank type, making it much easier to use partially applied.

catchToErrorSimple :: forall smallExc bigExc m a p. (Eff (Error bigExc) m, Threaders '[ReaderThreads] m p) => (bigExc -> Maybe smallExc) -> InterpretSimpleC (Catch smallExc) m a -> m a Source #

Transforms a Catch smallExc effect into an Error bigExc effect, by providing a function that identifies when exceptions of the larger exception type bigExc correspond to exceptions of the smaller exception type smallExc.

This is a less performant version of catchToError that doesn't have a higher-rank type, making it much easier to use partially applied.

errorToErrorSimple :: forall smallExc bigExc m a p. (Eff (Error bigExc) m, Threaders '[ReaderThreads] m p) => (smallExc -> bigExc) -> (bigExc -> Maybe smallExc) -> InterpretErrorSimpleC smallExc m a -> m a Source #

Transforms connected Throw and Catch effects -- i.e. Error -- into another Error effect by providing functions to convert between the two types of exceptions.

This is a less performant version of errorToError that doesn't have a higher-rank type, making it much easier to use partially applied.

Threading constraints

class (forall e. Threads (ExceptT e) p) => ErrorThreads p Source #

ErrorThreads accepts the following primitive effects:

Instances

Instances details
(forall e. Threads (ExceptT e) p) => ErrorThreads p Source # 
Instance details

Defined in Control.Effect.Internal.Error

MonadCatch

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 IO 
Instance details

Defined in Control.Monad.Catch

Methods

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

MonadCatch STM 
Instance details

Defined in Control.Monad.Catch

Methods

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

e ~ SomeException => MonadCatch (Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

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

MonadCatch m => MonadCatch (MaybeT m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

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

MonadCatch m => MonadCatch (ListT m) 
Instance details

Defined in Control.Monad.Catch

Methods

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

MonadCatch m => MonadCatch (ErrorIOToIOC m) Source # 
Instance details

Defined in Control.Effect.Internal.ErrorIO

Methods

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

MonadCatch m => MonadCatch (ConcToIOC m) Source # 
Instance details

Defined in Control.Effect.Internal.Conc

Methods

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

MonadCatch m => MonadCatch (TraceListC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

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

MonadCatch m => MonadCatch (ListT m) Source # 
Instance details

Defined in Control.Monad.Trans.List.Church

Methods

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

MonadCatch m => MonadCatch (NonDetC m) Source # 
Instance details

Defined in Control.Effect.Internal.NonDet

Methods

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

MonadCatch m => MonadCatch (CullCutC m) Source # 
Instance details

Defined in Control.Effect.Internal.NonDet

Methods

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

MonadCatch m => MonadCatch (LogicC m) Source # 
Instance details

Defined in Control.Effect.Internal.NonDet

Methods

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

MonadCatch m => MonadCatch (InterpretFailSimpleC m) Source # 
Instance details

Defined in Control.Effect.Fail

MonadCatch m => MonadCatch (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

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

MonadCatch m => MonadCatch (AltMaybeC m) Source # 
Instance details

Defined in Control.Effect.Alt

Methods

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

MonadCatch m => MonadCatch (InterpretAltSimpleC m) Source # 
Instance details

Defined in Control.Effect.Alt

MonadCatch m => MonadCatch (ExceptT e m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

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

(Error e, MonadCatch m) => MonadCatch (ErrorT e m)

Catches exceptions from the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

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

MonadCatch m => MonadCatch (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

catch :: 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 :: Exception e => WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

MonadCatch (CompositionBaseT ts m) => MonadCatch (CompositionC ts m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Compose

Methods

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

Eff ErrorIO m => MonadCatch (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

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

MonadCatch m => MonadCatch (InterpretPrimSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

MonadCatch m => MonadCatch (InterpretSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

MonadCatch m => MonadCatch (EmbedC m) Source # 
Instance details

Defined in Control.Effect.Embed

Methods

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

MonadCatch m => MonadCatch (RunMC m) Source # 
Instance details

Defined in Control.Effect.Embed

Methods

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

(Monoid o, MonadCatch m) => MonadCatch (WriterLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

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

(Monoid o, MonadCatch m) => MonadCatch (ListenLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

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

(Monoid o, MonadCatch m) => MonadCatch (TellLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

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

(Monoid o, MonadCatch m) => MonadCatch (WriterC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

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

(Monoid o, MonadCatch m) => MonadCatch (ListenC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

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

(Monoid o, MonadCatch m) => MonadCatch (TellC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

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

MonadCatch m => MonadCatch (UnliftC m) Source # 
Instance details

Defined in Control.Effect.Internal.Unlift

Methods

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

MonadCatch m => MonadCatch (StateLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.State

Methods

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

MonadCatch m => MonadCatch (StateC s m) Source # 
Instance details

Defined in Control.Effect.Internal.State

Methods

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

MonadCatch m => MonadCatch (HoistC m) Source # 
Instance details

Defined in Control.Effect.Internal.Regional

Methods

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

MonadCatch m => MonadCatch (ReaderC i m) Source # 
Instance details

Defined in Control.Effect.Internal.Reader

Methods

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

MonadCatch m => MonadCatch (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

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

MonadCatch m => MonadCatch (UnwrapTopC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Newtype

Methods

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

MonadCatch m => MonadCatch (UnwrapC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Newtype

Methods

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

MonadCatch m => MonadCatch (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadCatch m => MonadCatch (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadCatch m => MonadCatch (ErrorToIOAsExcC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadCatch m => MonadCatch (ErrorToErrorIOAsExcC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadCatch m => MonadCatch (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadCatch m => MonadCatch (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadCatch m => MonadCatch (SafeErrorToErrorIOSimpleC exc m) Source # 
Instance details

Defined in Control.Effect.Internal.Exceptional

MonadCatch m => MonadCatch (SafeErrorToIOSimpleC exc m) Source # 
Instance details

Defined in Control.Effect.Internal.Exceptional

Methods

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

MonadCatch m => MonadCatch (SafeErrorC exc m) Source # 
Instance details

Defined in Control.Effect.Internal.Exceptional

Methods

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

MonadCatch m => MonadCatch (BaseControlC m) Source # 
Instance details

Defined in Control.Effect.Internal.BaseControl

Methods

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

MonadCatch m => MonadCatch (FreshEnumC uniq m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

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

MonadCatch m => MonadCatch (WriterTVarC o m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

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

MonadCatch m => MonadCatch (ListenTVarC o m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

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

MonadCatch m => MonadCatch (WriterToBracketC o m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

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

MonadCatch m => MonadCatch (WriterIntoEndoWriterC o m) Source # 
Instance details

Defined in Control.Effect.Writer

MonadCatch m => MonadCatch (ListenIntoEndoListenC o m) Source # 
Instance details

Defined in Control.Effect.Writer

MonadCatch m => MonadCatch (TellListLazyC o m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

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

MonadCatch m => MonadCatch (TellListC o m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

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

MonadCatch m => MonadCatch (FreeT f m) Source # 
Instance details

Defined in Control.Monad.Trans.Free.Church.Alternate

Methods

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

MonadCatch m => MonadCatch (ShiftC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

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

MonadCatch m => MonadCatch (ContC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

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

MonadCatch m => MonadCatch (SteppedC e m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Stepped

Methods

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

MonadCatch m => MonadCatch (InterceptRC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Intercept

Methods

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

MonadCatch m => MonadCatch (ListenSteppedC w m) Source # 
Instance details

Defined in Control.Effect.Internal.Intercept

Methods

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

MonadCatch m => MonadCatch (InterceptContC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Intercept

Methods

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

MonadCatch m => MonadCatch (InterpretFailC h m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

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

MonadCatch m => MonadCatch (InterpretAltC h m) Source # 
Instance details

Defined in Control.Effect.Alt

Methods

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

MonadCatch m => MonadCatch (SubsumeC e m) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

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

MonadCatch m => MonadCatch (IntroC top new m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Intro

Methods

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

MonadCatch m => MonadCatch (ReinterpretSimpleC e new m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

MonadCatch m => MonadCatch (InterpretC h e m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

MonadCatch m => MonadCatch (InterpretPrimC s e m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

MonadCatch m => MonadCatch (UnionC l m) Source # 
Instance details

Defined in Control.Effect.Union

Methods

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

MonadCatch m => MonadCatch (WrapC e e' m) Source # 
Instance details

Defined in Control.Effect.Internal.Newtype

Methods

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

MonadCatch m => MonadCatch (SelectC s r m) Source # 
Instance details

Defined in Control.Effect.Internal.Select

Methods

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

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

Defined in Control.Monad.Catch

Methods

catch :: 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 :: Exception e => RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a #

MonadCatch (t (u m)) => MonadCatch (ComposeT t u m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Compose

Methods

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

Monad m => MonadCatch (ViaAlg s Bracket m) Source # 
Instance details

Defined in Control.Effect.Type.Bracket

Methods

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

Monad m => MonadCatch (ViaAlg s Mask m) Source # 
Instance details

Defined in Control.Effect.Type.Mask

Methods

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

MonadCatch m => MonadCatch (ReinterpretC h e new m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

catch :: Exception e0 => ReinterpretC h e new m a -> (e0 -> ReinterpretC h e new m a) -> ReinterpretC h e new m a #

MonadCatch m => MonadCatch (UnionizeC b m) Source # 
Instance details

Defined in Control.Effect.Union

Methods

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

MonadCatch m => MonadCatch (UnionizeHeadC b m) Source # 
Instance details

Defined in Control.Effect.Union

Methods

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

MonadCatch m => MonadCatch (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

catch :: Exception e0 => ErrorToIOC' s s' e m a -> (e0 -> ErrorToIOC' s s' e m a) -> ErrorToIOC' s s' e m a #

MonadCatch m => MonadCatch (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

catch :: Exception e0 => InterpretErrorC' s s' e m a -> (e0 -> InterpretErrorC' s s' e m a) -> InterpretErrorC' s s' e m a #

MonadCatch m => MonadCatch (SafeErrorToErrorIOC' s s' exc m) Source # 
Instance details

Defined in Control.Effect.Internal.Exceptional

Methods

catch :: Exception e => SafeErrorToErrorIOC' s s' exc m a -> (e -> SafeErrorToErrorIOC' s s' exc m a) -> SafeErrorToErrorIOC' s s' exc m a #

MonadCatch m => MonadCatch (SafeErrorToIOC' s s' exc m) Source # 
Instance details

Defined in Control.Effect.Internal.Exceptional

Methods

catch :: Exception e => SafeErrorToIOC' s s' exc m a -> (e -> SafeErrorToIOC' s s' exc m a) -> SafeErrorToIOC' s s' exc m a #

MonadCatch m => MonadCatch (ExceptionallyC eff exc m) Source # 
Instance details

Defined in Control.Effect.Internal.Exceptional

Methods

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

MonadCatch m => MonadCatch (GainBaseControlC b z m) Source # 
Instance details

Defined in Control.Effect.BaseControl

Methods

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

Carriers

data ThrowC e m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftBase :: b α -> ThrowC e m α #

MonadBaseControl b m => MonadBaseControl b (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StM (ThrowC e m) a #

Methods

liftBaseWith :: (RunInBase (ThrowC e m) b -> b a) -> ThrowC e m a #

restoreM :: StM (ThrowC e m) a -> ThrowC e m a #

MonadTrans (ThrowC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

lift :: Monad m => m a -> ThrowC e m a #

MonadTransControl (ThrowC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StT (ThrowC e) a #

Methods

liftWith :: Monad m => (Run (ThrowC e) -> m a) -> ThrowC e m a #

restoreT :: Monad m => m (StT (ThrowC e) a) -> ThrowC e m a #

Monad m => Monad (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

(>>=) :: ThrowC e m a -> (a -> ThrowC e m b) -> ThrowC e m b #

(>>) :: ThrowC e m a -> ThrowC e m b -> ThrowC e m b #

return :: a -> ThrowC e m a #

Functor m => Functor (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fmap :: (a -> b) -> ThrowC e m a -> ThrowC e m b #

(<$) :: a -> ThrowC e m b -> ThrowC e m a #

MonadFix m => MonadFix (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mfix :: (a -> ThrowC e m a) -> ThrowC e m a #

MonadFail m => MonadFail (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> ThrowC e m a #

Monad m => Applicative (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

pure :: a -> ThrowC e m a #

(<*>) :: ThrowC e m (a -> b) -> ThrowC e m a -> ThrowC e m b #

liftA2 :: (a -> b -> c) -> ThrowC e m a -> ThrowC e m b -> ThrowC e m c #

(*>) :: ThrowC e m a -> ThrowC e m b -> ThrowC e m b #

(<*) :: ThrowC e m a -> ThrowC e m b -> ThrowC e m a #

MonadIO m => MonadIO (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftIO :: IO a -> ThrowC e m a #

(Monad m, Monoid e) => Alternative (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

empty :: ThrowC e m a #

(<|>) :: ThrowC e m a -> ThrowC e m a -> ThrowC e m a #

some :: ThrowC e m a -> ThrowC e m [a] #

many :: ThrowC e m a -> ThrowC e m [a] #

(Monad m, Monoid e) => MonadPlus (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mzero :: ThrowC e m a #

mplus :: ThrowC e m a -> ThrowC e m a -> ThrowC e m a #

MonadThrow m => MonadThrow (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

throwM :: Exception e0 => e0 -> ThrowC e m a #

MonadCatch m => MonadCatch (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadMask m => MonadMask (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mask :: ((forall a. ThrowC e m a -> ThrowC e m a) -> ThrowC e m b) -> ThrowC e m b #

uninterruptibleMask :: ((forall a. ThrowC e m a -> ThrowC e m a) -> ThrowC e m b) -> ThrowC e m b #

generalBracket :: ThrowC e m a -> (a -> ExitCase b -> ThrowC e m c) -> (a -> ThrowC e m b) -> ThrowC e m (b, c) #

(Carrier m, Threads (ExceptT e) (Prims m)) => Carrier (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type Derivs (ThrowC e m) :: [Effect] Source #

type Prims (ThrowC e m) :: [Effect] Source #

Methods

algPrims :: Algebra' (Prims (ThrowC e m)) (ThrowC e m) a Source #

reformulate :: Monad z => Reformulation' (Derivs (ThrowC e m)) (Prims (ThrowC e m)) (ThrowC e m) z a Source #

algDerivs :: Algebra' (Derivs (ThrowC e m)) (ThrowC e m) a Source #

type StT (ThrowC e) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StT (ThrowC e) a = StT (ExceptT e) a
type Derivs (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Derivs (ThrowC e m) = Throw e ': Derivs m
type Prims (ThrowC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Prims (ThrowC e m) = Prims m
type StM (ThrowC e m) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StM (ThrowC e m) a = StM (ExceptT e m) a

data ErrorC e m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftBase :: b α -> ErrorC e m α #

MonadBaseControl b m => MonadBaseControl b (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StM (ErrorC e m) a #

Methods

liftBaseWith :: (RunInBase (ErrorC e m) b -> b a) -> ErrorC e m a #

restoreM :: StM (ErrorC e m) a -> ErrorC e m a #

MonadTrans (ErrorC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

lift :: Monad m => m a -> ErrorC e m a #

MonadTransControl (ErrorC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StT (ErrorC e) a #

Methods

liftWith :: Monad m => (Run (ErrorC e) -> m a) -> ErrorC e m a #

restoreT :: Monad m => m (StT (ErrorC e) a) -> ErrorC e m a #

Monad m => Monad (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

(>>=) :: ErrorC e m a -> (a -> ErrorC e m b) -> ErrorC e m b #

(>>) :: ErrorC e m a -> ErrorC e m b -> ErrorC e m b #

return :: a -> ErrorC e m a #

Functor m => Functor (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fmap :: (a -> b) -> ErrorC e m a -> ErrorC e m b #

(<$) :: a -> ErrorC e m b -> ErrorC e m a #

MonadFix m => MonadFix (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mfix :: (a -> ErrorC e m a) -> ErrorC e m a #

MonadFail m => MonadFail (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> ErrorC e m a #

Monad m => Applicative (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

pure :: a -> ErrorC e m a #

(<*>) :: ErrorC e m (a -> b) -> ErrorC e m a -> ErrorC e m b #

liftA2 :: (a -> b -> c) -> ErrorC e m a -> ErrorC e m b -> ErrorC e m c #

(*>) :: ErrorC e m a -> ErrorC e m b -> ErrorC e m b #

(<*) :: ErrorC e m a -> ErrorC e m b -> ErrorC e m a #

MonadIO m => MonadIO (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftIO :: IO a -> ErrorC e m a #

(Monad m, Monoid e) => Alternative (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

empty :: ErrorC e m a #

(<|>) :: ErrorC e m a -> ErrorC e m a -> ErrorC e m a #

some :: ErrorC e m a -> ErrorC e m [a] #

many :: ErrorC e m a -> ErrorC e m [a] #

(Monad m, Monoid e) => MonadPlus (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mzero :: ErrorC e m a #

mplus :: ErrorC e m a -> ErrorC e m a -> ErrorC e m a #

MonadThrow m => MonadThrow (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

throwM :: Exception e0 => e0 -> ErrorC e m a #

MonadCatch m => MonadCatch (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadMask m => MonadMask (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mask :: ((forall a. ErrorC e m a -> ErrorC e m a) -> ErrorC e m b) -> ErrorC e m b #

uninterruptibleMask :: ((forall a. ErrorC e m a -> ErrorC e m a) -> ErrorC e m b) -> ErrorC e m b #

generalBracket :: ErrorC e m a -> (a -> ExitCase b -> ErrorC e m c) -> (a -> ErrorC e m b) -> ErrorC e m (b, c) #

(Carrier m, Threads (ExceptT e) (Prims m)) => Carrier (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type Derivs (ErrorC e m) :: [Effect] Source #

type Prims (ErrorC e m) :: [Effect] Source #

Methods

algPrims :: Algebra' (Prims (ErrorC e m)) (ErrorC e m) a Source #

reformulate :: Monad z => Reformulation' (Derivs (ErrorC e m)) (Prims (ErrorC e m)) (ErrorC e m) z a Source #

algDerivs :: Algebra' (Derivs (ErrorC e m)) (ErrorC e m) a Source #

type StT (ErrorC e) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StT (ErrorC e) a = StT (ExceptT e) a
type Derivs (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Derivs (ErrorC e m) = Catch e ': (Throw e ': Derivs m)
type Prims (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Prims (ErrorC e m) = Optional ((->) e :: Type -> Type) ': Prims m
type StM (ErrorC e m) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StM (ErrorC e m) a = StM (ExceptT e m) a

type ErrorToIOC e m a = forall s s'. ReifiesErrorHandler s s' e (ErrorIOToIOC m) => ErrorToIOC' s s' e m a Source #

data ErrorToIOC' s s' e m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftBase :: b α -> ErrorToIOC' s s' e m α #

MonadBaseControl b m => MonadBaseControl b (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StM (ErrorToIOC' s s' e m) a #

Methods

liftBaseWith :: (RunInBase (ErrorToIOC' s s' e m) b -> b a) -> ErrorToIOC' s s' e m a #

restoreM :: StM (ErrorToIOC' s s' e m) a -> ErrorToIOC' s s' e m a #

MonadTrans (ErrorToIOC' s s' e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

lift :: Monad m => m a -> ErrorToIOC' s s' e m a #

MonadTransControl (ErrorToIOC' s s' e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StT (ErrorToIOC' s s' e) a #

Methods

liftWith :: Monad m => (Run (ErrorToIOC' s s' e) -> m a) -> ErrorToIOC' s s' e m a #

restoreT :: Monad m => m (StT (ErrorToIOC' s s' e) a) -> ErrorToIOC' s s' e m a #

Monad m => Monad (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

(>>=) :: ErrorToIOC' s s' e m a -> (a -> ErrorToIOC' s s' e m b) -> ErrorToIOC' s s' e m b #

(>>) :: ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m b -> ErrorToIOC' s s' e m b #

return :: a -> ErrorToIOC' s s' e m a #

Functor m => Functor (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fmap :: (a -> b) -> ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m b #

(<$) :: a -> ErrorToIOC' s s' e m b -> ErrorToIOC' s s' e m a #

MonadFix m => MonadFix (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mfix :: (a -> ErrorToIOC' s s' e m a) -> ErrorToIOC' s s' e m a #

MonadFail m => MonadFail (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> ErrorToIOC' s s' e m a #

Applicative m => Applicative (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

pure :: a -> ErrorToIOC' s s' e m a #

(<*>) :: ErrorToIOC' s s' e m (a -> b) -> ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m b #

liftA2 :: (a -> b -> c) -> ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m b -> ErrorToIOC' s s' e m c #

(*>) :: ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m b -> ErrorToIOC' s s' e m b #

(<*) :: ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m b -> ErrorToIOC' s s' e m a #

MonadIO m => MonadIO (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftIO :: IO a -> ErrorToIOC' s s' e m a #

Alternative m => Alternative (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

empty :: ErrorToIOC' s s' e m a #

(<|>) :: ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m a #

some :: ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m [a] #

many :: ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m [a] #

MonadPlus m => MonadPlus (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mzero :: ErrorToIOC' s s' e m a #

mplus :: ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m a #

MonadThrow m => MonadThrow (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

throwM :: Exception e0 => e0 -> ErrorToIOC' s s' e m a #

MonadCatch m => MonadCatch (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

catch :: Exception e0 => ErrorToIOC' s s' e m a -> (e0 -> ErrorToIOC' s s' e m a) -> ErrorToIOC' s s' e m a #

MonadMask m => MonadMask (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mask :: ((forall a. ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m a) -> ErrorToIOC' s s' e m b) -> ErrorToIOC' s s' e m b #

uninterruptibleMask :: ((forall a. ErrorToIOC' s s' e m a -> ErrorToIOC' s s' e m a) -> ErrorToIOC' s s' e m b) -> ErrorToIOC' s s' e m b #

generalBracket :: ErrorToIOC' s s' e m a -> (a -> ExitCase b -> ErrorToIOC' s s' e m c) -> (a -> ErrorToIOC' s s' e m b) -> ErrorToIOC' s s' e m (b, c) #

(Carrier m, MonadCatch m, ReifiesErrorHandler s s' e (ErrorIOToIOC m)) => Carrier (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type Derivs (ErrorToIOC' s s' e m) :: [Effect] Source #

type Prims (ErrorToIOC' s s' e m) :: [Effect] Source #

Methods

algPrims :: Algebra' (Prims (ErrorToIOC' s s' e m)) (ErrorToIOC' s s' e m) a Source #

reformulate :: Monad z => Reformulation' (Derivs (ErrorToIOC' s s' e m)) (Prims (ErrorToIOC' s s' e m)) (ErrorToIOC' s s' e m) z a Source #

algDerivs :: Algebra' (Derivs (ErrorToIOC' s s' e m)) (ErrorToIOC' s s' e m) a Source #

type StT (ErrorToIOC' s s' e) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Derivs (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Derivs (ErrorToIOC' s s' e m) = Derivs (IntroC '[Catch e, Throw e] '[ErrorIO] (InterpretErrorC' s s' e (ErrorIOToIOC m)))
type Prims (ErrorToIOC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Prims (ErrorToIOC' s s' e m) = Prims (IntroC '[Catch e, Throw e] '[ErrorIO] (InterpretErrorC' s s' e (ErrorIOToIOC m)))
type StM (ErrorToIOC' s s' e m) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StM (ErrorToIOC' s s' e m) a = StM (IntroC '[Catch e, Throw e] '[ErrorIO] (InterpretErrorC' s s' e (ErrorIOToIOC m))) a

type InterpretErrorC e m a = forall s s'. ReifiesErrorHandler s s' e m => InterpretErrorC' s s' e m a Source #

data InterpretErrorC' s s' e m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftBase :: b α -> InterpretErrorC' s s' e m α #

MonadBaseControl b m => MonadBaseControl b (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StM (InterpretErrorC' s s' e m) a #

Methods

liftBaseWith :: (RunInBase (InterpretErrorC' s s' e m) b -> b a) -> InterpretErrorC' s s' e m a #

restoreM :: StM (InterpretErrorC' s s' e m) a -> InterpretErrorC' s s' e m a #

MonadTrans (InterpretErrorC' s s' e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

lift :: Monad m => m a -> InterpretErrorC' s s' e m a #

MonadTransControl (InterpretErrorC' s s' e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StT (InterpretErrorC' s s' e) a #

Methods

liftWith :: Monad m => (Run (InterpretErrorC' s s' e) -> m a) -> InterpretErrorC' s s' e m a #

restoreT :: Monad m => m (StT (InterpretErrorC' s s' e) a) -> InterpretErrorC' s s' e m a #

Monad m => Monad (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

(>>=) :: InterpretErrorC' s s' e m a -> (a -> InterpretErrorC' s s' e m b) -> InterpretErrorC' s s' e m b #

(>>) :: InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m b -> InterpretErrorC' s s' e m b #

return :: a -> InterpretErrorC' s s' e m a #

Functor m => Functor (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fmap :: (a -> b) -> InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m b #

(<$) :: a -> InterpretErrorC' s s' e m b -> InterpretErrorC' s s' e m a #

MonadFix m => MonadFix (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mfix :: (a -> InterpretErrorC' s s' e m a) -> InterpretErrorC' s s' e m a #

MonadFail m => MonadFail (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> InterpretErrorC' s s' e m a #

Applicative m => Applicative (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

pure :: a -> InterpretErrorC' s s' e m a #

(<*>) :: InterpretErrorC' s s' e m (a -> b) -> InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m b #

liftA2 :: (a -> b -> c) -> InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m b -> InterpretErrorC' s s' e m c #

(*>) :: InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m b -> InterpretErrorC' s s' e m b #

(<*) :: InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m b -> InterpretErrorC' s s' e m a #

MonadIO m => MonadIO (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftIO :: IO a -> InterpretErrorC' s s' e m a #

Alternative m => Alternative (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

empty :: InterpretErrorC' s s' e m a #

(<|>) :: InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m a #

some :: InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m [a] #

many :: InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m [a] #

MonadPlus m => MonadPlus (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mzero :: InterpretErrorC' s s' e m a #

mplus :: InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m a #

MonadThrow m => MonadThrow (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

throwM :: Exception e0 => e0 -> InterpretErrorC' s s' e m a #

MonadCatch m => MonadCatch (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

catch :: Exception e0 => InterpretErrorC' s s' e m a -> (e0 -> InterpretErrorC' s s' e m a) -> InterpretErrorC' s s' e m a #

MonadMask m => MonadMask (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mask :: ((forall a. InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m a) -> InterpretErrorC' s s' e m b) -> InterpretErrorC' s s' e m b #

uninterruptibleMask :: ((forall a. InterpretErrorC' s s' e m a -> InterpretErrorC' s s' e m a) -> InterpretErrorC' s s' e m b) -> InterpretErrorC' s s' e m b #

generalBracket :: InterpretErrorC' s s' e m a -> (a -> ExitCase b -> InterpretErrorC' s s' e m c) -> (a -> InterpretErrorC' s s' e m b) -> InterpretErrorC' s s' e m (b, c) #

(Carrier m, ReifiesErrorHandler s s' e m) => Carrier (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type Derivs (InterpretErrorC' s s' e m) :: [Effect] Source #

type Prims (InterpretErrorC' s s' e m) :: [Effect] Source #

type StT (InterpretErrorC' s s' e) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Derivs (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Prims (InterpretErrorC' s s' e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StM (InterpretErrorC' s s' e m) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StM (InterpretErrorC' s s' e m) a = StM (InterpretC (ViaReifiedH s) (Catch e) (InterpretC (ViaReifiedH s') (Throw e) m)) a

data ErrorToIOSimpleC e m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftBase :: b α -> ErrorToIOSimpleC e m α #

MonadBaseControl b m => MonadBaseControl b (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StM (ErrorToIOSimpleC e m) a #

MonadTrans (ErrorToIOSimpleC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

lift :: Monad m => m a -> ErrorToIOSimpleC e m a #

Monad m => Monad (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

(>>=) :: ErrorToIOSimpleC e m a -> (a -> ErrorToIOSimpleC e m b) -> ErrorToIOSimpleC e m b #

(>>) :: ErrorToIOSimpleC e m a -> ErrorToIOSimpleC e m b -> ErrorToIOSimpleC e m b #

return :: a -> ErrorToIOSimpleC e m a #

Functor m => Functor (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fmap :: (a -> b) -> ErrorToIOSimpleC e m a -> ErrorToIOSimpleC e m b #

(<$) :: a -> ErrorToIOSimpleC e m b -> ErrorToIOSimpleC e m a #

MonadFix m => MonadFix (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mfix :: (a -> ErrorToIOSimpleC e m a) -> ErrorToIOSimpleC e m a #

MonadFail m => MonadFail (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> ErrorToIOSimpleC e m a #

Applicative m => Applicative (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

pure :: a -> ErrorToIOSimpleC e m a #

(<*>) :: ErrorToIOSimpleC e m (a -> b) -> ErrorToIOSimpleC e m a -> ErrorToIOSimpleC e m b #

liftA2 :: (a -> b -> c) -> ErrorToIOSimpleC e m a -> ErrorToIOSimpleC e m b -> ErrorToIOSimpleC e m c #

(*>) :: ErrorToIOSimpleC e m a -> ErrorToIOSimpleC e m b -> ErrorToIOSimpleC e m b #

(<*) :: ErrorToIOSimpleC e m a -> ErrorToIOSimpleC e m b -> ErrorToIOSimpleC e m a #

MonadIO m => MonadIO (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftIO :: IO a -> ErrorToIOSimpleC e m a #

Alternative m => Alternative (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

MonadPlus m => MonadPlus (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

MonadThrow m => MonadThrow (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

throwM :: Exception e0 => e0 -> ErrorToIOSimpleC e m a #

MonadCatch m => MonadCatch (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadMask m => MonadMask (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mask :: ((forall a. ErrorToIOSimpleC e m a -> ErrorToIOSimpleC e m a) -> ErrorToIOSimpleC e m b) -> ErrorToIOSimpleC e m b #

uninterruptibleMask :: ((forall a. ErrorToIOSimpleC e m a -> ErrorToIOSimpleC e m a) -> ErrorToIOSimpleC e m b) -> ErrorToIOSimpleC e m b #

generalBracket :: ErrorToIOSimpleC e m a -> (a -> ExitCase b -> ErrorToIOSimpleC e m c) -> (a -> ErrorToIOSimpleC e m b) -> ErrorToIOSimpleC e m (b, c) #

(Eff (Embed IO) m, MonadCatch m, Threaders '[ReaderThreads] m p) => Carrier (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type Derivs (ErrorToIOSimpleC e m) :: [Effect] Source #

type Prims (ErrorToIOSimpleC e m) :: [Effect] Source #

type Derivs (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Prims (ErrorToIOSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StM (ErrorToIOSimpleC e m) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

data InterpretErrorSimpleC e m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftBase :: b α -> InterpretErrorSimpleC e m α #

MonadBaseControl b m => MonadBaseControl b (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StM (InterpretErrorSimpleC e m) a #

MonadTrans (InterpretErrorSimpleC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

lift :: Monad m => m a -> InterpretErrorSimpleC e m a #

Monad m => Monad (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Functor m => Functor (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fmap :: (a -> b) -> InterpretErrorSimpleC e m a -> InterpretErrorSimpleC e m b #

(<$) :: a -> InterpretErrorSimpleC e m b -> InterpretErrorSimpleC e m a #

MonadFix m => MonadFix (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

mfix :: (a -> InterpretErrorSimpleC e m a) -> InterpretErrorSimpleC e m a #

MonadFail m => MonadFail (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> InterpretErrorSimpleC e m a #

Applicative m => Applicative (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

MonadIO m => MonadIO (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

liftIO :: IO a -> InterpretErrorSimpleC e m a #

Alternative m => Alternative (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

MonadPlus m => MonadPlus (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

MonadThrow m => MonadThrow (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

throwM :: Exception e0 => e0 -> InterpretErrorSimpleC e m a #

MonadCatch m => MonadCatch (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadMask m => MonadMask (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

(Carrier m, Threaders '[ReaderThreads] m p) => Carrier (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type Derivs (InterpretErrorSimpleC e m) :: [Effect] Source #

type Prims (InterpretErrorSimpleC e m) :: [Effect] Source #

type Derivs (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Prims (InterpretErrorSimpleC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type StM (InterpretErrorSimpleC e m) a Source # 
Instance details

Defined in Control.Effect.Internal.Error