in-other-words-0.1.1.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