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

Control.Effect.Internal.Error

Synopsis

Documentation

newtype ThrowC e m a Source #

Constructors

ThrowC 

Fields

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

newtype ErrorC e m a Source #

Constructors

ErrorC 

Fields

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

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

newtype 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

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

newtype ErrorToIOC' s s' e m a Source #

Constructors

ErrorToIOC' 

Fields

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 ErrorToIOC e m a = forall s s'. ReifiesErrorHandler s s' e (ErrorIOToIOC m) => ErrorToIOC' s s' e m a Source #

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.

data ErrorToErrorIOAsExcH Source #

Instances

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

Defined in Control.Effect.Internal.Error

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

Defined in Control.Effect.Internal.Error

newtype ErrorToErrorIOAsExcC e m a Source #

Instances

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.Error

Associated Types

type StM (ErrorToErrorIOAsExcC e m) a #

MonadTrans (ErrorToErrorIOAsExcC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadTransControl (ErrorToErrorIOAsExcC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StT (ErrorToErrorIOAsExcC e) a #

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

Defined in Control.Effect.Internal.Error

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

Defined in Control.Effect.Internal.Error

Methods

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

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

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> ErrorToErrorIOAsExcC e m a #

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

Defined in Control.Effect.Internal.Error

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.Error

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

Defined in Control.Effect.Internal.Error

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

Defined in Control.Effect.Internal.Error

Methods

throwM :: Exception e0 => e0 -> ErrorToErrorIOAsExcC 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 #

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

Defined in Control.Effect.Internal.Error

(Eff ErrorIO m, Exception e) => Carrier (ErrorToErrorIOAsExcC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

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

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

type StT (ErrorToErrorIOAsExcC e) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Derivs (ErrorToErrorIOAsExcC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Prims (ErrorToErrorIOAsExcC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

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

Defined in Control.Effect.Internal.Error

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

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.

newtype ErrorToIOAsExcC e m a Source #

Instances

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.Error

Associated Types

type StM (ErrorToIOAsExcC e m) a #

Methods

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

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

MonadTrans (ErrorToIOAsExcC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Methods

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

MonadTransControl (ErrorToIOAsExcC e) Source # 
Instance details

Defined in Control.Effect.Internal.Error

Associated Types

type StT (ErrorToIOAsExcC e) a #

Methods

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

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

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

Defined in Control.Effect.Internal.Error

Methods

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

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

return :: a -> ErrorToIOAsExcC e m a #

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

Defined in Control.Effect.Internal.Error

Methods

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

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

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> ErrorToIOAsExcC e m a #

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

Defined in Control.Effect.Internal.Error

Methods

pure :: a -> ErrorToIOAsExcC e m a #

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

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

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

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

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.Error

Methods

empty :: ErrorToIOAsExcC e m a #

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

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

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

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

Defined in Control.Effect.Internal.Error

Methods

mzero :: ErrorToIOAsExcC e m a #

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

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

Defined in Control.Effect.Internal.Error

Methods

throwM :: Exception e0 => e0 -> ErrorToIOAsExcC 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 #

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

Defined in Control.Effect.Internal.Error

Methods

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

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

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

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

Defined in Control.Effect.Internal.Error

Associated Types

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

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

type StT (ErrorToIOAsExcC e) a Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Derivs (ErrorToIOAsExcC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

type Prims (ErrorToIOAsExcC e m) Source # 
Instance details

Defined in Control.Effect.Internal.Error

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

Defined in Control.Effect.Internal.Error

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

newtype 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

newtype 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

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.

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.