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

Control.Effect.Internal.Derive

Description

Module exporting typical type classes that are newtype-derived by Carriers

Synopsis

Documentation

class Applicative f => Alternative (f :: Type -> Type) #

A monoid on applicative functors.

If defined, some and many should be the least solutions of the equations:

Minimal complete definition

empty, (<|>)

Instances

Instances details
Alternative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: [a] #

(<|>) :: [a] -> [a] -> [a] #

some :: [a] -> [[a]] #

many :: [a] -> [[a]] #

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Alternative Concurrently 
Instance details

Defined in Control.Concurrent.Async

Alternative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

empty :: Option a #

(<|>) :: Option a -> Option a -> Option a #

some :: Option a -> Option [a] #

many :: Option a -> Option [a] #

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

Alternative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

empty :: STM a #

(<|>) :: STM a -> STM a -> STM a #

some :: STM a -> STM [a] #

many :: STM a -> STM [a] #

Alternative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: ReadP a #

(<|>) :: ReadP a -> ReadP a -> ReadP a #

some :: ReadP a -> ReadP [a] #

many :: ReadP a -> ReadP [a] #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a #

(<|>) :: Seq a -> Seq a -> Seq a #

some :: Seq a -> Seq [a] #

many :: Seq a -> Seq [a] #

Alternative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: P a #

(<|>) :: P a -> P a -> P a #

some :: P a -> P [a] #

many :: P a -> P [a] #

Alternative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: U1 a #

(<|>) :: U1 a -> U1 a -> U1 a #

some :: U1 a -> U1 [a] #

many :: U1 a -> U1 [a] #

MonadPlus m => Alternative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #

some :: WrappedMonad m a -> WrappedMonad m [a] #

many :: WrappedMonad m a -> WrappedMonad m [a] #

ArrowPlus a => Alternative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: ArrowMonad a a0 #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a #

(<|>) :: Proxy a -> Proxy a -> Proxy a #

some :: Proxy a -> Proxy [a] #

many :: Proxy a -> Proxy [a] #

(Functor m, Monad m) => Alternative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

empty :: MaybeT m a #

(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a #

some :: MaybeT m a -> MaybeT m [a] #

many :: MaybeT m a -> MaybeT m [a] #

Applicative m => Alternative (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

empty :: ListT m a #

(<|>) :: ListT m a -> ListT m a -> ListT m a #

some :: ListT m a -> ListT m [a] #

many :: ListT m a -> ListT m [a] #

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

Defined in Control.Effect.Fail

(Monad m, Carrier (InterpretSimpleC (Alt :: (Type -> Type) -> Type -> Type) m)) => Alternative (InterpretAltSimpleC m) Source # 
Instance details

Defined in Control.Effect.Alt

Alternative f => Alternative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: Rec1 f a #

(<|>) :: Rec1 f a -> Rec1 f a -> Rec1 f a #

some :: Rec1 f a -> Rec1 f [a] #

many :: Rec1 f a -> Rec1 f [a] #

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Alternative m => Alternative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: Kleisli m a a0 #

(<|>) :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

some :: Kleisli m a a0 -> Kleisli m a [a0] #

many :: Kleisli m a a0 -> Kleisli m a [a0] #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a #

(<|>) :: Ap f a -> Ap f a -> Ap f a #

some :: Ap f a -> Ap f [a] #

many :: Ap f a -> Ap f [a] #

Alternative f => Alternative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

empty :: Alt f a #

(<|>) :: Alt f a -> Alt f a -> Alt f a #

some :: Alt f a -> Alt f [a] #

many :: Alt f a -> Alt f [a] #

(Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

empty :: ExceptT e m a #

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

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

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

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

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

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

some :: ReaderT r m a -> ReaderT r m [a] #

many :: ReaderT r m a -> ReaderT r m [a] #

(Functor m, Monad m, Error e) => Alternative (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

empty :: ErrorT e m a #

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

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

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

Alternative m => Alternative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

empty :: IdentityT m a #

(<|>) :: IdentityT m a -> IdentityT m a -> IdentityT m a #

some :: IdentityT m a -> IdentityT m [a] #

many :: IdentityT m a -> IdentityT m [a] #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

empty :: AccumT w m a #

(<|>) :: AccumT w m a -> AccumT w m a -> AccumT w m a #

some :: AccumT w m a -> AccumT w m [a] #

many :: AccumT w m a -> AccumT w m [a] #

(Functor m, MonadPlus m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Functor m, MonadPlus m) => Alternative (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

empty :: SelectT r m a #

(<|>) :: SelectT r m a -> SelectT r m a -> SelectT r m a #

some :: SelectT r m a -> SelectT r m [a] #

many :: SelectT r m a -> SelectT r m [a] #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

empty :: CompositionC ts m a #

(<|>) :: CompositionC ts m a -> CompositionC ts m a -> CompositionC ts m a #

some :: CompositionC ts m a -> CompositionC ts m [a] #

many :: CompositionC ts m a -> CompositionC ts m [a] #

Eff (Alt :: (Type -> Type) -> Type -> Type) m => Alternative (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

empty :: Effly m a #

(<|>) :: Effly m a -> Effly m a -> Effly m a #

some :: Effly m a -> Effly m [a] #

many :: Effly m a -> Effly m [a] #

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

Defined in Control.Effect.Carrier.Internal.Interpret

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

Defined in Control.Effect.Carrier.Internal.Interpret

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

Defined in Control.Effect.Embed

Methods

empty :: RunMC m a #

(<|>) :: RunMC m a -> RunMC m a -> RunMC m a #

some :: RunMC m a -> RunMC m [a] #

many :: RunMC m a -> RunMC m [a] #

(Monoid s, Alternative m) => Alternative (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

empty :: WriterLazyC s m a #

(<|>) :: WriterLazyC s m a -> WriterLazyC s m a -> WriterLazyC s m a #

some :: WriterLazyC s m a -> WriterLazyC s m [a] #

many :: WriterLazyC s m a -> WriterLazyC s m [a] #

(Monoid s, Alternative m) => Alternative (ListenLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

empty :: ListenLazyC s m a #

(<|>) :: ListenLazyC s m a -> ListenLazyC s m a -> ListenLazyC s m a #

some :: ListenLazyC s m a -> ListenLazyC s m [a] #

many :: ListenLazyC s m a -> ListenLazyC s m [a] #

(Monoid s, Alternative m) => Alternative (TellLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

empty :: TellLazyC s m a #

(<|>) :: TellLazyC s m a -> TellLazyC s m a -> TellLazyC s m a #

some :: TellLazyC s m a -> TellLazyC s m [a] #

many :: TellLazyC s m a -> TellLazyC s m [a] #

MonadPlus m => Alternative (WriterC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

empty :: WriterC s m a #

(<|>) :: WriterC s m a -> WriterC s m a -> WriterC s m a #

some :: WriterC s m a -> WriterC s m [a] #

many :: WriterC s m a -> WriterC s m [a] #

MonadPlus m => Alternative (ListenC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

empty :: ListenC s m a #

(<|>) :: ListenC s m a -> ListenC s m a -> ListenC s m a #

some :: ListenC s m a -> ListenC s m [a] #

many :: ListenC s m a -> ListenC s m [a] #

MonadPlus m => Alternative (TellC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

empty :: TellC s m a #

(<|>) :: TellC s m a -> TellC s m a -> TellC s m a #

some :: TellC s m a -> TellC s m [a] #

many :: TellC s m a -> TellC s m [a] #

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

Defined in Control.Effect.Internal.Unlift

Methods

empty :: UnliftC m a #

(<|>) :: UnliftC m a -> UnliftC m a -> UnliftC m a #

some :: UnliftC m a -> UnliftC m [a] #

many :: UnliftC m a -> UnliftC m [a] #

MonadPlus m => Alternative (StateLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.State

Methods

empty :: StateLazyC s m a #

(<|>) :: StateLazyC s m a -> StateLazyC s m a -> StateLazyC s m a #

some :: StateLazyC s m a -> StateLazyC s m [a] #

many :: StateLazyC s m a -> StateLazyC s m [a] #

MonadPlus m => Alternative (StateC s m) Source # 
Instance details

Defined in Control.Effect.Internal.State

Methods

empty :: StateC s m a #

(<|>) :: StateC s m a -> StateC s m a -> StateC s m a #

some :: StateC s m a -> StateC s m [a] #

many :: StateC s m a -> StateC s m [a] #

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

Defined in Control.Effect.Internal.Regional

Methods

empty :: HoistC m a #

(<|>) :: HoistC m a -> HoistC m a -> HoistC m a #

some :: HoistC m a -> HoistC m [a] #

many :: HoistC m a -> HoistC m [a] #

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

Defined in Control.Effect.Internal.Reader

Methods

empty :: ReaderC i m a #

(<|>) :: ReaderC i m a -> ReaderC i m a -> ReaderC i m a #

some :: ReaderC i m a -> ReaderC i m [a] #

many :: ReaderC i m a -> ReaderC i m [a] #

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

Defined in Control.Effect.Internal.Optional

Methods

empty :: HoistOptionC m a #

(<|>) :: HoistOptionC m a -> HoistOptionC m a -> HoistOptionC m a #

some :: HoistOptionC m a -> HoistOptionC m [a] #

many :: HoistOptionC m a -> HoistOptionC m [a] #

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

Defined in Control.Effect.Internal.Newtype

Methods

empty :: UnwrapTopC e m a #

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

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

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

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

Defined in Control.Effect.Internal.Newtype

Methods

empty :: UnwrapC e m a #

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

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

many :: UnwrapC e m a -> UnwrapC 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) => 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] #

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

Defined in Control.Effect.Internal.BaseControl

Methods

empty :: BaseControlC m a #

(<|>) :: BaseControlC m a -> BaseControlC m a -> BaseControlC m a #

some :: BaseControlC m a -> BaseControlC m [a] #

many :: BaseControlC m a -> BaseControlC m [a] #

Eff Conc m => Alternative (Concurrently m) Source # 
Instance details

Defined in Control.Effect.Conc

Methods

empty :: Concurrently m a #

(<|>) :: Concurrently m a -> Concurrently m a -> Concurrently m a #

some :: Concurrently m a -> Concurrently m [a] #

many :: Concurrently m a -> Concurrently m [a] #

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

Defined in Control.Effect.Internal.Intercept

Methods

empty :: InterceptRC e m a #

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

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

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

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

Defined in Control.Effect.Fail

Methods

empty :: InterpretFailC h m a #

(<|>) :: InterpretFailC h m a -> InterpretFailC h m a -> InterpretFailC h m a #

some :: InterpretFailC h m a -> InterpretFailC h m [a] #

many :: InterpretFailC h m a -> InterpretFailC h m [a] #

Handler h (Alt :: (Type -> Type) -> Type -> Type) m => Alternative (InterpretAltC h m) Source # 
Instance details

Defined in Control.Effect.Alt

Methods

empty :: InterpretAltC h m a #

(<|>) :: InterpretAltC h m a -> InterpretAltC h m a -> InterpretAltC h m a #

some :: InterpretAltC h m a -> InterpretAltC h m [a] #

many :: InterpretAltC h m a -> InterpretAltC h m [a] #

(Alternative f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a #

(<|>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

some :: (f :*: g) a -> (f :*: g) [a] #

many :: (f :*: g) a -> (f :*: g) [a] #

(Alternative f, Alternative g) => Alternative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

empty :: Product f g a #

(<|>) :: Product f g a -> Product f g a -> Product f g a #

some :: Product f g a -> Product f g [a] #

many :: Product f g a -> Product f g [a] #

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

Defined in Control.Effect.Internal

Methods

empty :: SubsumeC e m a #

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

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

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

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

Defined in Control.Effect.Carrier.Internal.Intro

Methods

empty :: IntroC top new m a #

(<|>) :: IntroC top new m a -> IntroC top new m a -> IntroC top new m a #

some :: IntroC top new m a -> IntroC top new m [a] #

many :: IntroC top new m a -> IntroC top new m [a] #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

empty :: ReinterpretSimpleC e new m a #

(<|>) :: ReinterpretSimpleC e new m a -> ReinterpretSimpleC e new m a -> ReinterpretSimpleC e new m a #

some :: ReinterpretSimpleC e new m a -> ReinterpretSimpleC e new m [a] #

many :: ReinterpretSimpleC e new m a -> ReinterpretSimpleC e new m [a] #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

empty :: InterpretC h e m a #

(<|>) :: InterpretC h e m a -> InterpretC h e m a -> InterpretC h e m a #

some :: InterpretC h e m a -> InterpretC h e m [a] #

many :: InterpretC h e m a -> InterpretC h e m [a] #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

empty :: InterpretPrimC s e m a #

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

some :: InterpretPrimC s e m a -> InterpretPrimC s e m [a] #

many :: InterpretPrimC s e m a -> InterpretPrimC s e m [a] #

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

Defined in Control.Effect.Union

Methods

empty :: UnionC l m a #

(<|>) :: UnionC l m a -> UnionC l m a -> UnionC l m a #

some :: UnionC l m a -> UnionC l m [a] #

many :: UnionC l m a -> UnionC l m [a] #

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

Defined in Control.Effect.Internal.Newtype

Methods

empty :: WrapC e e' m a #

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

some :: WrapC e e' m a -> WrapC e e' m [a] #

many :: WrapC e e' m a -> WrapC e e' m [a] #

Alternative f => Alternative (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: M1 i c f a #

(<|>) :: M1 i c f a -> M1 i c f a -> M1 i c f a #

some :: M1 i c f a -> M1 i c f [a] #

many :: M1 i c f a -> M1 i c f [a] #

(Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a #

(<|>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a #

some :: (f :.: g) a -> (f :.: g) [a] #

many :: (f :.: g) a -> (f :.: g) [a] #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

empty :: RWST r w s m a #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

empty :: RWST r w s m a #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

empty :: ComposeT t u m a #

(<|>) :: ComposeT t u m a -> ComposeT t u m a -> ComposeT t u m a #

some :: ComposeT t u m a -> ComposeT t u m [a] #

many :: ComposeT t u m a -> ComposeT t u m [a] #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

empty :: ReinterpretC h e new m a #

(<|>) :: ReinterpretC h e new m a -> ReinterpretC h e new m a -> ReinterpretC h e new m a #

some :: ReinterpretC h e new m a -> ReinterpretC h e new m [a] #

many :: ReinterpretC h e new m a -> ReinterpretC h e new m [a] #

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

Defined in Control.Effect.Union

Methods

empty :: UnionizeC b m a #

(<|>) :: UnionizeC b m a -> UnionizeC b m a -> UnionizeC b m a #

some :: UnionizeC b m a -> UnionizeC b m [a] #

many :: UnionizeC b m a -> UnionizeC b m [a] #

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

Defined in Control.Effect.Exceptional

Methods

empty :: ExceptionallyC eff exc m a #

(<|>) :: ExceptionallyC eff exc m a -> ExceptionallyC eff exc m a -> ExceptionallyC eff exc m a #

some :: ExceptionallyC eff exc m a -> ExceptionallyC eff exc m [a] #

many :: ExceptionallyC eff exc m a -> ExceptionallyC eff exc m [a] #

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

Defined in Control.Effect.BaseControl

Methods

empty :: GainBaseControlC b z m a #

(<|>) :: GainBaseControlC b z m a -> GainBaseControlC b z m a -> GainBaseControlC b z m a #

some :: GainBaseControlC b z m a -> GainBaseControlC b z m [a] #

many :: GainBaseControlC b z m a -> GainBaseControlC b z m [a] #

class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) #

Monads that also support choice and failure.

Instances

Instances details
MonadPlus []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: [a] #

mplus :: [a] -> [a] -> [a] #

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

MonadPlus Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mzero :: Option a #

mplus :: Option a -> Option a -> Option a #

MonadPlus STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mzero :: STM a #

mplus :: STM a -> STM a -> STM a #

MonadPlus ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: ReadP a #

mplus :: ReadP a -> ReadP a -> ReadP a #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

MonadPlus P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: P a #

mplus :: P a -> P a -> P a #

MonadPlus (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: U1 a #

mplus :: U1 a -> U1 a -> U1 a #

(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: ArrowMonad a a0 #

mplus :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

MonadPlus (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzero :: Proxy a #

mplus :: Proxy a -> Proxy a -> Proxy a #

Monad m => MonadPlus (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzero :: MaybeT m a #

mplus :: MaybeT m a -> MaybeT m a -> MaybeT m a #

Monad m => MonadPlus (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

mzero :: ListT m a #

mplus :: ListT m a -> ListT m a -> ListT m a #

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

Defined in Control.Effect.Fail

(Monad m, Carrier (InterpretSimpleC (Alt :: (Type -> Type) -> Type -> Type) m)) => MonadPlus (InterpretAltSimpleC m) Source # 
Instance details

Defined in Control.Effect.Alt

MonadPlus f => MonadPlus (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: Rec1 f a #

mplus :: Rec1 f a -> Rec1 f a -> Rec1 f a #

MonadPlus m => MonadPlus (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: Kleisli m a a0 #

mplus :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a #

mplus :: Ap f a -> Ap f a -> Ap f a #

MonadPlus f => MonadPlus (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mzero :: Alt f a #

mplus :: Alt f a -> Alt f a -> Alt f a #

(Monad m, Monoid e) => MonadPlus (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzero :: ExceptT e m a #

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

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

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

Defined in Control.Monad.Trans.State.Lazy

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

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

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

(Monad m, Error e) => MonadPlus (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

mzero :: ErrorT e m a #

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

MonadPlus m => MonadPlus (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzero :: IdentityT m a #

mplus :: IdentityT m a -> IdentityT m a -> IdentityT m a #

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

Defined in Control.Monad.Trans.State.Strict

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

(Monoid w, Functor m, MonadPlus m) => MonadPlus (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

mzero :: AccumT w m a #

mplus :: AccumT w m a -> AccumT w m a -> AccumT w m a #

(Functor m, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

MonadPlus m => MonadPlus (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

mzero :: SelectT r m a #

mplus :: SelectT r m a -> SelectT r m a -> SelectT r m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

mzero :: CompositionC ts m a #

mplus :: CompositionC ts m a -> CompositionC ts m a -> CompositionC ts m a #

Eff (Alt :: (Type -> Type) -> Type -> Type) m => MonadPlus (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

mzero :: Effly m a #

mplus :: Effly m a -> Effly m a -> Effly m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

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

Defined in Control.Effect.Carrier.Internal.Interpret

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

Defined in Control.Effect.Embed

Methods

mzero :: RunMC m a #

mplus :: RunMC m a -> RunMC m a -> RunMC m a #

(Monoid s, MonadPlus m) => MonadPlus (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mzero :: WriterLazyC s m a #

mplus :: WriterLazyC s m a -> WriterLazyC s m a -> WriterLazyC s m a #

(Monoid s, MonadPlus m) => MonadPlus (ListenLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mzero :: ListenLazyC s m a #

mplus :: ListenLazyC s m a -> ListenLazyC s m a -> ListenLazyC s m a #

(Monoid s, MonadPlus m) => MonadPlus (TellLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mzero :: TellLazyC s m a #

mplus :: TellLazyC s m a -> TellLazyC s m a -> TellLazyC s m a #

MonadPlus m => MonadPlus (WriterC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mzero :: WriterC s m a #

mplus :: WriterC s m a -> WriterC s m a -> WriterC s m a #

MonadPlus m => MonadPlus (ListenC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mzero :: ListenC s m a #

mplus :: ListenC s m a -> ListenC s m a -> ListenC s m a #

MonadPlus m => MonadPlus (TellC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mzero :: TellC s m a #

mplus :: TellC s m a -> TellC s m a -> TellC s m a #

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

Defined in Control.Effect.Internal.Unlift

Methods

mzero :: UnliftC m a #

mplus :: UnliftC m a -> UnliftC m a -> UnliftC m a #

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

Defined in Control.Effect.Internal.State

Methods

mzero :: StateLazyC s m a #

mplus :: StateLazyC s m a -> StateLazyC s m a -> StateLazyC s m a #

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

Defined in Control.Effect.Internal.State

Methods

mzero :: StateC s m a #

mplus :: StateC s m a -> StateC s m a -> StateC s m a #

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

Defined in Control.Effect.Internal.Regional

Methods

mzero :: HoistC m a #

mplus :: HoistC m a -> HoistC m a -> HoistC m a #

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

Defined in Control.Effect.Internal.Reader

Methods

mzero :: ReaderC i m a #

mplus :: ReaderC i m a -> ReaderC i m a -> ReaderC i m a #

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

Defined in Control.Effect.Internal.Optional

Methods

mzero :: HoistOptionC m a #

mplus :: HoistOptionC m a -> HoistOptionC m a -> HoistOptionC m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

mzero :: UnwrapTopC e m a #

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

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

Defined in Control.Effect.Internal.Newtype

Methods

mzero :: UnwrapC e m a #

mplus :: UnwrapC e m a -> UnwrapC e m a -> UnwrapC 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 #

(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 #

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

Defined in Control.Effect.Internal.BaseControl

Methods

mzero :: BaseControlC m a #

mplus :: BaseControlC m a -> BaseControlC m a -> BaseControlC m a #

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

Defined in Control.Effect.Internal.Intercept

Methods

mzero :: InterceptRC e m a #

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

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

Defined in Control.Effect.Fail

Methods

mzero :: InterpretFailC h m a #

mplus :: InterpretFailC h m a -> InterpretFailC h m a -> InterpretFailC h m a #

Handler h (Alt :: (Type -> Type) -> Type -> Type) m => MonadPlus (InterpretAltC h m) Source # 
Instance details

Defined in Control.Effect.Alt

Methods

mzero :: InterpretAltC h m a #

mplus :: InterpretAltC h m a -> InterpretAltC h m a -> InterpretAltC h m a #

(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a #

mplus :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

mzero :: Product f g a #

mplus :: Product f g a -> Product f g a -> Product f g a #

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

Defined in Control.Effect.Internal

Methods

mzero :: SubsumeC e m a #

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

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

Defined in Control.Effect.Carrier.Internal.Intro

Methods

mzero :: IntroC top new m a #

mplus :: IntroC top new m a -> IntroC top new m a -> IntroC top new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mzero :: ReinterpretSimpleC e new m a #

mplus :: ReinterpretSimpleC e new m a -> ReinterpretSimpleC e new m a -> ReinterpretSimpleC e new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mzero :: InterpretC h e m a #

mplus :: InterpretC h e m a -> InterpretC h e m a -> InterpretC h e m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mzero :: InterpretPrimC s e m a #

mplus :: InterpretPrimC s e m a -> InterpretPrimC s e m a -> InterpretPrimC s e m a #

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

Defined in Control.Effect.Union

Methods

mzero :: UnionC l m a #

mplus :: UnionC l m a -> UnionC l m a -> UnionC l m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

mzero :: WrapC e e' m a #

mplus :: WrapC e e' m a -> WrapC e e' m a -> WrapC e e' m a #

MonadPlus f => MonadPlus (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: M1 i c f a #

mplus :: M1 i c f a -> M1 i c f a -> M1 i c f a #

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

Defined in Control.Monad.Trans.RWS.Lazy

Methods

mzero :: RWST r w s m a #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

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

Defined in Control.Monad.Trans.RWS.Strict

Methods

mzero :: RWST r w s m a #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

mzero :: ComposeT t u m a #

mplus :: ComposeT t u m a -> ComposeT t u m a -> ComposeT t u m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mzero :: ReinterpretC h e new m a #

mplus :: ReinterpretC h e new m a -> ReinterpretC h e new m a -> ReinterpretC h e new m a #

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

Defined in Control.Effect.Union

Methods

mzero :: UnionizeC b m a #

mplus :: UnionizeC b m a -> UnionizeC b m a -> UnionizeC b m a #

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

Defined in Control.Effect.Exceptional

Methods

mzero :: ExceptionallyC eff exc m a #

mplus :: ExceptionallyC eff exc m a -> ExceptionallyC eff exc m a -> ExceptionallyC eff exc m a #

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

Defined in Control.Effect.BaseControl

Methods

mzero :: GainBaseControlC b z m a #

mplus :: GainBaseControlC b z m a -> GainBaseControlC b z m a -> GainBaseControlC b z m a #

class Monad m => MonadFix (m :: Type -> Type) #

Monads having fixed points with a 'knot-tying' semantics. Instances of MonadFix should satisfy the following laws:

Purity
mfix (return . h) = return (fix h)
Left shrinking (or Tightening)
mfix (\x -> a >>= \y -> f x y) = a >>= \y -> mfix (\x -> f x y)
Sliding
mfix (liftM h . f) = liftM h (mfix (f . h)), for strict h.
Nesting
mfix (\x -> mfix (\y -> f x y)) = mfix (\x -> f x x)

This class is used in the translation of the recursive do notation supported by GHC and Hugs.

Minimal complete definition

mfix

Instances

Instances details
MonadFix []

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> [a]) -> [a] #

MonadFix Maybe

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Maybe a) -> Maybe a #

MonadFix IO

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> IO a) -> IO a #

MonadFix Par1

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Par1 a) -> Par1 a #

MonadFix Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Min a) -> Min a #

MonadFix Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Max a) -> Max a #

MonadFix First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> First a) -> First a #

MonadFix Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Last a) -> Last a #

MonadFix Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Option a) -> Option a #

MonadFix Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mfix :: (a -> Identity a) -> Identity a #

MonadFix First

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> First a) -> First a #

MonadFix Last

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Last a) -> Last a #

MonadFix Dual

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Dual a) -> Dual a #

MonadFix Sum

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Sum a) -> Sum a #

MonadFix Product

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Product a) -> Product a #

MonadFix Down

Since: base-4.12.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Down a) -> Down a #

MonadFix NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> NonEmpty a) -> NonEmpty a #

MonadFix Tree

Since: containers-0.5.11

Instance details

Defined in Data.Tree

Methods

mfix :: (a -> Tree a) -> Tree a #

MonadFix Seq

Since: containers-0.5.11

Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a #

MonadFix (Either e)

Since: base-4.3.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Either e a) -> Either e a #

MonadFix (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> ST s a) -> ST s a #

MonadFix (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

mfix :: (a -> ST s a) -> ST s a #

MonadFix m => MonadFix (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mfix :: (a -> MaybeT m a) -> MaybeT m a #

MonadFix m => MonadFix (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

mfix :: (a -> ListT m a) -> ListT m a #

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

Defined in Control.Effect.Fail

Methods

mfix :: (a -> InterpretFailSimpleC m a) -> InterpretFailSimpleC m a #

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

Defined in Control.Effect.Alt

Methods

mfix :: (a -> InterpretAltSimpleC m a) -> InterpretAltSimpleC m a #

MonadFix f => MonadFix (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Rec1 f a) -> Rec1 f a #

MonadFix f => MonadFix (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Ap f a) -> Ap f a #

MonadFix f => MonadFix (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Alt f a) -> Alt f a #

MonadFix m => MonadFix (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

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

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

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

Defined in Control.Monad.Trans.State.Lazy

Methods

mfix :: (a -> StateT s m a) -> StateT s m a #

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

Defined in Control.Monad.Trans.Reader

Methods

mfix :: (a -> ReaderT r m a) -> ReaderT r m a #

(MonadFix m, Error e) => MonadFix (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

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

MonadFix m => MonadFix (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mfix :: (a -> IdentityT m a) -> IdentityT m a #

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

Defined in Control.Monad.Trans.State.Strict

Methods

mfix :: (a -> StateT s m a) -> StateT s m a #

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

(Monoid w, Functor m, MonadFix m) => MonadFix (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

mfix :: (a -> AccumT w m a) -> AccumT w m a #

MonadFix m => MonadFix (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

mfix :: (a -> CompositionC ts m a) -> CompositionC ts m a #

Eff Fix m => MonadFix (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

mfix :: (a -> Effly m a) -> Effly m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

Defined in Control.Effect.Embed

Methods

mfix :: (a -> RunMC m a) -> RunMC m a #

(Monoid s, MonadFix m) => MonadFix (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mfix :: (a -> WriterLazyC s m a) -> WriterLazyC s m a #

(Monoid s, MonadFix m) => MonadFix (ListenLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mfix :: (a -> ListenLazyC s m a) -> ListenLazyC s m a #

(Monoid s, MonadFix m) => MonadFix (TellLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mfix :: (a -> TellLazyC s m a) -> TellLazyC s m a #

MonadFix m => MonadFix (WriterC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mfix :: (a -> WriterC s m a) -> WriterC s m a #

MonadFix m => MonadFix (ListenC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mfix :: (a -> ListenC s m a) -> ListenC s m a #

MonadFix m => MonadFix (TellC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mfix :: (a -> TellC s m a) -> TellC s m a #

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

Defined in Control.Effect.Internal.Unlift

Methods

mfix :: (a -> UnliftC m a) -> UnliftC m a #

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

Defined in Control.Effect.Internal.State

Methods

mfix :: (a -> StateLazyC s m a) -> StateLazyC s m a #

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

Defined in Control.Effect.Internal.State

Methods

mfix :: (a -> StateC s m a) -> StateC s m a #

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

Defined in Control.Effect.Internal.Regional

Methods

mfix :: (a -> HoistC m a) -> HoistC m a #

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

Defined in Control.Effect.Internal.Reader

Methods

mfix :: (a -> ReaderC i m a) -> ReaderC i m a #

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

Defined in Control.Effect.Internal.Optional

Methods

mfix :: (a -> HoistOptionC m a) -> HoistOptionC m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

Defined in Control.Effect.Internal.Newtype

Methods

mfix :: (a -> UnwrapC e m a) -> UnwrapC 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 #

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 #

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

Defined in Control.Effect.Internal.BaseControl

Methods

mfix :: (a -> BaseControlC m a) -> BaseControlC m a #

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

Defined in Control.Effect.Internal.Intercept

Methods

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

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

Defined in Control.Effect.Fail

Methods

mfix :: (a -> InterpretFailC h m a) -> InterpretFailC h m a #

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

Defined in Control.Effect.Alt

Methods

mfix :: (a -> InterpretAltC h m a) -> InterpretAltC h m a #

MonadFix ((->) r :: Type -> Type)

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> r -> a) -> r -> a #

(MonadFix f, MonadFix g) => MonadFix (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> (f :*: g) a) -> (f :*: g) a #

(MonadFix f, MonadFix g) => MonadFix (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

mfix :: (a -> Product f g a) -> Product f g a #

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

Defined in Control.Effect.Internal

Methods

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

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

Defined in Control.Effect.Carrier.Internal.Intro

Methods

mfix :: (a -> IntroC top new m a) -> IntroC top new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mfix :: (a -> ReinterpretSimpleC e new m a) -> ReinterpretSimpleC e new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mfix :: (a -> InterpretC h e m a) -> InterpretC h e m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mfix :: (a -> InterpretPrimC s e m a) -> InterpretPrimC s e m a #

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

Defined in Control.Effect.Union

Methods

mfix :: (a -> UnionC l m a) -> UnionC l m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

mfix :: (a -> WrapC e e' m a) -> WrapC e e' m a #

MonadFix f => MonadFix (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> M1 i c f a) -> M1 i c f a #

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

Defined in Control.Monad.Trans.RWS.Lazy

Methods

mfix :: (a -> RWST r w s m a) -> RWST r w s m a #

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

Defined in Control.Monad.Trans.RWS.Strict

Methods

mfix :: (a -> RWST r w s m a) -> RWST r w s m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

mfix :: (a -> ComposeT t u m a) -> ComposeT t u m a #

(Reifies s (ReifiedEffAlgebra Fix m), Monad m) => MonadFix (ViaAlg s Fix m) Source # 
Instance details

Defined in Control.Effect.Type.Fix

Methods

mfix :: (a -> ViaAlg s Fix m a) -> ViaAlg s Fix m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mfix :: (a -> ReinterpretC h e new m a) -> ReinterpretC h e new m a #

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

Defined in Control.Effect.Union

Methods

mfix :: (a -> UnionizeC b m a) -> UnionizeC b m a #

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

Defined in Control.Effect.Exceptional

Methods

mfix :: (a -> ExceptionallyC eff exc m a) -> ExceptionallyC eff exc m a #

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

Defined in Control.Effect.BaseControl

Methods

mfix :: (a -> GainBaseControlC b z m a) -> GainBaseControlC b z m a #

class Monad m => MonadFail (m :: Type -> Type) #

When a value is bound in do-notation, the pattern on the left hand side of <- might not match. In this case, this class provides a function to recover.

A Monad without a MonadFail instance may only be used in conjunction with pattern that always match, such as newtypes, tuples, data types with only a single data constructor, and irrefutable patterns (~pat).

Instances of MonadFail should satisfy the following law: fail s should be a left zero for >>=,

fail s >>= f  =  fail s

If your Monad is also MonadPlus, a popular definition is

fail _ = mzero

Since: base-4.9.0.0

Minimal complete definition

fail

Instances

Instances details
MonadFail []

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> [a] #

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a #

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> IO a #

MonadFail Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fail :: String -> Q a #

MonadFail ReadP

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> ReadP a #

MonadFail P

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> P a #

MonadFail (ST s)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

fail :: String -> ST s a #

MonadFail (ST s)

Since: base-4.10

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

fail :: String -> ST s a #

Monad m => MonadFail (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fail :: String -> MaybeT m a #

Monad m => MonadFail (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

fail :: String -> ListT m a #

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

Defined in Control.Monad.Trans.List.Church

Methods

fail :: String -> ListT m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

fail :: String -> NonDetC m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

fail :: String -> CullCutC m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

fail :: String -> LogicC m a #

(Monad m, Carrier (InterpretSimpleC (Fail :: (Type -> Type) -> Type -> Type) m)) => MonadFail (InterpretFailSimpleC m) Source # 
Instance details

Defined in Control.Effect.Fail

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

Defined in Control.Effect.Alt

Methods

fail :: String -> InterpretAltSimpleC m a #

MonadFail f => MonadFail (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fail :: String -> Ap f a #

MonadFail m => MonadFail (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fail :: String -> ExceptT e m a #

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fail :: String -> WriterT w m a #

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

Defined in Control.Monad.Trans.State.Lazy

Methods

fail :: String -> StateT s m a #

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

Defined in Control.Monad.Trans.Reader

Methods

fail :: String -> ReaderT r m a #

(Monad m, Error e) => MonadFail (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

fail :: String -> ErrorT e m a #

MonadFail m => MonadFail (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fail :: String -> IdentityT m a #

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

Defined in Control.Monad.Trans.State.Strict

Methods

fail :: String -> StateT s m a #

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

fail :: String -> WriterT w m a #

(Monoid w, MonadFail m) => MonadFail (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

fail :: String -> AccumT w m a #

MonadFail m => MonadFail (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

fail :: String -> WriterT w m a #

MonadFail m => MonadFail (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

fail :: String -> SelectT r m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

fail :: String -> CompositionC ts m a #

Eff (Fail :: (Type -> Type) -> Type -> Type) m => MonadFail (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

fail :: String -> Effly m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

fail :: String -> InterpretPrimSimpleC e m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

fail :: String -> InterpretSimpleC e m a #

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

Defined in Control.Effect.Embed

Methods

fail :: String -> RunMC m a #

(Monoid s, MonadFail m) => MonadFail (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> WriterLazyC s m a #

(Monoid s, MonadFail m) => MonadFail (ListenLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> ListenLazyC s m a #

(Monoid s, MonadFail m) => MonadFail (TellLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> TellLazyC s m a #

MonadFail m => MonadFail (WriterC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> WriterC s m a #

MonadFail m => MonadFail (ListenC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> ListenC s m a #

MonadFail m => MonadFail (TellC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> TellC s m a #

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

Defined in Control.Effect.Internal.Unlift

Methods

fail :: String -> UnliftC m a #

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

Defined in Control.Effect.Internal.State

Methods

fail :: String -> StateLazyC s m a #

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

Defined in Control.Effect.Internal.State

Methods

fail :: String -> StateC s m a #

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

Defined in Control.Effect.Internal.Regional

Methods

fail :: String -> HoistC m a #

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

Defined in Control.Effect.Internal.Reader

Methods

fail :: String -> ReaderC i m a #

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

Defined in Control.Effect.Internal.Optional

Methods

fail :: String -> HoistOptionC m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

fail :: String -> UnwrapTopC e m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

fail :: String -> UnwrapC 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 #

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

Defined in Control.Effect.Internal.Error

Methods

fail :: String -> ThrowC e m a #

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

Defined in Control.Effect.Internal.BaseControl

Methods

fail :: String -> BaseControlC m a #

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

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

Methods

fail :: String -> FreeT f m a #

MonadFail m => MonadFail (ShiftFastC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

fail :: String -> ShiftFastC r m a #

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

Defined in Control.Effect.Internal.Cont

Methods

fail :: String -> ShiftC r m a #

MonadFail m => MonadFail (ContFastC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

fail :: String -> ContFastC r m a #

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

Defined in Control.Effect.Internal.Cont

Methods

fail :: String -> ContC r m a #

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

Defined in Control.Effect.Carrier.Internal.Stepped

Methods

fail :: String -> SteppedC e m a #

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

Defined in Control.Effect.Internal.Intercept

Methods

fail :: String -> InterceptRC e m a #

Handler h (Fail :: (Type -> Type) -> Type -> Type) m => MonadFail (InterpretFailC h m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

fail :: String -> InterpretFailC h m a #

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

Defined in Control.Effect.Alt

Methods

fail :: String -> InterpretAltC h m a #

MonadFail m => MonadFail (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

fail :: String -> ContT r m a #

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

Defined in Control.Effect.Internal

Methods

fail :: String -> SubsumeC e m a #

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

Defined in Control.Effect.Carrier.Internal.Intro

Methods

fail :: String -> IntroC top new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

fail :: String -> ReinterpretSimpleC e new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

fail :: String -> InterpretC h e m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

fail :: String -> InterpretPrimC s e m a #

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

Defined in Control.Effect.Union

Methods

fail :: String -> UnionC l m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

fail :: String -> WrapC e e' m a #

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

Defined in Control.Monad.Trans.RWS.Lazy

Methods

fail :: String -> RWST r w s m a #

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

Defined in Control.Monad.Trans.RWS.Strict

Methods

fail :: String -> RWST r w s m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

fail :: String -> ComposeT t u m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

fail :: String -> ReinterpretC h e new m a #

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

Defined in Control.Effect.Union

Methods

fail :: String -> UnionizeC b m a #

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

Defined in Control.Effect.Exceptional

Methods

fail :: String -> ExceptionallyC eff exc m a #

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

Defined in Control.Effect.BaseControl

Methods

fail :: String -> GainBaseControlC b z m a #

class Monad m => MonadIO (m :: Type -> Type) #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Minimal complete definition

liftIO

Instances

Instances details
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a #

MonadIO m => MonadIO (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

liftIO :: IO a -> ListT m a #

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

Defined in Control.Monad.Trans.List.Church

Methods

liftIO :: IO a -> ListT m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

liftIO :: IO a -> NonDetC m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

liftIO :: IO a -> CullCutC m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

liftIO :: IO a -> LogicC m a #

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

Defined in Control.Effect.Fail

Methods

liftIO :: IO a -> InterpretFailSimpleC m a #

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

Defined in Control.Effect.Alt

Methods

liftIO :: IO a -> InterpretAltSimpleC m a #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

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

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftIO :: IO a -> WriterT w m a #

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

Defined in Control.Monad.Trans.State.Lazy

Methods

liftIO :: IO a -> StateT s m a #

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

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

(Error e, MonadIO m) => MonadIO (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

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

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a #

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

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a #

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, Functor m, MonadIO m) => MonadIO (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

liftIO :: IO a -> AccumT w m a #

MonadIO m => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

liftIO :: IO a -> WriterT w m a #

MonadIO m => MonadIO (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

liftIO :: IO a -> SelectT r m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

liftIO :: IO a -> CompositionC ts m a #

Eff (Embed IO :: (Type -> Type) -> Type -> Type) m => MonadIO (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

liftIO :: IO a -> Effly m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

Defined in Control.Effect.Embed

Methods

liftIO :: IO a -> RunMC m a #

(Monoid s, MonadIO m) => MonadIO (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftIO :: IO a -> WriterLazyC s m a #

(Monoid s, MonadIO m) => MonadIO (ListenLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftIO :: IO a -> ListenLazyC s m a #

(Monoid s, MonadIO m) => MonadIO (TellLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftIO :: IO a -> TellLazyC s m a #

MonadIO m => MonadIO (WriterC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftIO :: IO a -> WriterC s m a #

MonadIO m => MonadIO (ListenC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftIO :: IO a -> ListenC s m a #

MonadIO m => MonadIO (TellC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftIO :: IO a -> TellC s m a #

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

Defined in Control.Effect.Internal.Unlift

Methods

liftIO :: IO a -> UnliftC m a #

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

Defined in Control.Effect.Internal.State

Methods

liftIO :: IO a -> StateLazyC s m a #

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

Defined in Control.Effect.Internal.State

Methods

liftIO :: IO a -> StateC s m a #

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

Defined in Control.Effect.Internal.Regional

Methods

liftIO :: IO a -> HoistC m a #

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

Defined in Control.Effect.Internal.Reader

Methods

liftIO :: IO a -> ReaderC i m a #

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

Defined in Control.Effect.Internal.Optional

Methods

liftIO :: IO a -> HoistOptionC m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

Defined in Control.Effect.Internal.Newtype

Methods

liftIO :: IO a -> UnwrapC 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 #

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.BaseControl

Methods

liftIO :: IO a -> BaseControlC m a #

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

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

Methods

liftIO :: IO a -> FreeT f m a #

MonadIO m => MonadIO (ShiftFastC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

liftIO :: IO a -> ShiftFastC r m a #

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

Defined in Control.Effect.Internal.Cont

Methods

liftIO :: IO a -> ShiftC r m a #

MonadIO m => MonadIO (ContFastC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

liftIO :: IO a -> ContFastC r m a #

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

Defined in Control.Effect.Internal.Cont

Methods

liftIO :: IO a -> ContC r m a #

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

Defined in Control.Effect.Carrier.Internal.Stepped

Methods

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

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

Defined in Control.Effect.Internal.Intercept

Methods

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

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

Defined in Control.Effect.Fail

Methods

liftIO :: IO a -> InterpretFailC h m a #

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

Defined in Control.Effect.Alt

Methods

liftIO :: IO a -> InterpretAltC h m a #

MonadIO m => MonadIO (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

liftIO :: IO a -> ContT r m a #

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

Defined in Control.Effect.Internal

Methods

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

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

Defined in Control.Effect.Carrier.Internal.Intro

Methods

liftIO :: IO a -> IntroC top new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftIO :: IO a -> ReinterpretSimpleC e new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftIO :: IO a -> InterpretC h e m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftIO :: IO a -> InterpretPrimC s e m a #

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

Defined in Control.Effect.Union

Methods

liftIO :: IO a -> UnionC l m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

liftIO :: IO a -> WrapC e e' m a #

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

Defined in Control.Monad.Trans.RWS.Lazy

Methods

liftIO :: IO a -> RWST r w s m a #

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

Defined in Control.Monad.Trans.RWS.Strict

Methods

liftIO :: IO a -> RWST r w s m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

liftIO :: IO a -> ComposeT t u m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftIO :: IO a -> ReinterpretC h e new m a #

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

Defined in Control.Effect.Union

Methods

liftIO :: IO a -> UnionizeC b m a #

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

Defined in Control.Effect.Exceptional

Methods

liftIO :: IO a -> ExceptionallyC eff exc m a #

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

Defined in Control.Effect.BaseControl

Methods

liftIO :: IO a -> GainBaseControlC b z m a #

class Monad m => MonadThrow (m :: Type -> Type) #

A class for monads in which exceptions may be thrown.

Instances should obey the following law:

throwM e >> x = throwM e

In other words, throwing an exception short-circuits the rest of the monadic computation.

Minimal complete definition

throwM

Instances

Instances details
MonadThrow [] 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> [a] #

MonadThrow Maybe 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> Maybe a #

MonadThrow IO 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> IO a #

MonadThrow Q 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> Q a #

MonadThrow STM 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> STM a #

e ~ SomeException => MonadThrow (Either e) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e0 => e0 -> Either e a #

MonadThrow (ST s) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ST s a #

MonadThrow m => MonadThrow (MaybeT m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> MaybeT m a #

MonadThrow m => MonadThrow (ListT m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ListT m a #

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

Defined in Control.Monad.Trans.List.Church

Methods

throwM :: Exception e => e -> ListT m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

throwM :: Exception e => e -> NonDetC m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

throwM :: Exception e => e -> CullCutC m a #

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

Defined in Control.Effect.Internal.NonDet

Methods

throwM :: Exception e => e -> LogicC m a #

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

Defined in Control.Effect.Fail

Methods

throwM :: Exception e => e -> InterpretFailSimpleC m a #

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

Defined in Control.Effect.Alt

Methods

throwM :: Exception e => e -> InterpretAltSimpleC m a #

MonadThrow m => MonadThrow (ExceptT e m)

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

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

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

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> WriterT w m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> StateT s m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ReaderT r m a #

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

Throws exceptions into the base monad.

Instance details

Defined in Control.Monad.Catch

Methods

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

MonadThrow m => MonadThrow (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> IdentityT m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> StateT s m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> WriterT w m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

throwM :: Exception e => e -> CompositionC ts m a #

Eff (ErrorIO :: (Type -> Type) -> Type -> Type) m => MonadThrow (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

throwM :: Exception e => e -> Effly m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

Defined in Control.Effect.Embed

Methods

throwM :: Exception e => e -> RunMC m a #

(Monoid s, MonadThrow m) => MonadThrow (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

throwM :: Exception e => e -> WriterLazyC s m a #

(Monoid s, MonadThrow m) => MonadThrow (ListenLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

throwM :: Exception e => e -> ListenLazyC s m a #

(Monoid s, MonadThrow m) => MonadThrow (TellLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

throwM :: Exception e => e -> TellLazyC s m a #

MonadThrow m => MonadThrow (WriterC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

throwM :: Exception e => e -> WriterC s m a #

MonadThrow m => MonadThrow (ListenC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

throwM :: Exception e => e -> ListenC s m a #

MonadThrow m => MonadThrow (TellC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

throwM :: Exception e => e -> TellC s m a #

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

Defined in Control.Effect.Internal.Unlift

Methods

throwM :: Exception e => e -> UnliftC m a #

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

Defined in Control.Effect.Internal.State

Methods

throwM :: Exception e => e -> StateLazyC s m a #

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

Defined in Control.Effect.Internal.State

Methods

throwM :: Exception e => e -> StateC s m a #

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

Defined in Control.Effect.Internal.Regional

Methods

throwM :: Exception e => e -> HoistC m a #

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

Defined in Control.Effect.Internal.Reader

Methods

throwM :: Exception e => e -> ReaderC i m a #

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

Defined in Control.Effect.Internal.Optional

Methods

throwM :: Exception e => e -> HoistOptionC m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.BaseControl

Methods

throwM :: Exception e => e -> BaseControlC m a #

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

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

Methods

throwM :: Exception e => e -> FreeT f m a #

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

Defined in Control.Effect.Internal.Cont

Methods

throwM :: Exception e => e -> ShiftC r m a #

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

Defined in Control.Effect.Internal.Cont

Methods

throwM :: Exception e => e -> ContC r m a #

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

Defined in Control.Effect.Carrier.Internal.Stepped

Methods

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

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

Defined in Control.Effect.Internal.Intercept

Methods

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

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

Defined in Control.Effect.Fail

Methods

throwM :: Exception e => e -> InterpretFailC h m a #

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

Defined in Control.Effect.Alt

Methods

throwM :: Exception e => e -> InterpretAltC h m a #

MonadThrow m => MonadThrow (ContT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ContT r m a #

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

Defined in Control.Effect.Internal

Methods

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

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

Defined in Control.Effect.Carrier.Internal.Intro

Methods

throwM :: Exception e => e -> IntroC top new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

throwM :: Exception e0 => e0 -> ReinterpretSimpleC e new m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

throwM :: Exception e0 => e0 -> InterpretC h e m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

Defined in Control.Effect.Union

Methods

throwM :: Exception e => e -> UnionC l m a #

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> RWST r w s m a #

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

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> RWST r w s m a #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

throwM :: Exception e => e -> ComposeT t u m a #

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

Defined in Control.Effect.Type.Bracket

Methods

throwM :: Exception e => e -> ViaAlg s Bracket m a #

Monad m => MonadThrow (ViaAlg s (Mask :: (Type -> Type) -> Type -> Type) m) Source # 
Instance details

Defined in Control.Effect.Type.Mask

Methods

throwM :: Exception e => e -> ViaAlg s Mask m a #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

throwM :: Exception e0 => e0 -> ReinterpretC h e new m a #

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

Defined in Control.Effect.Union

Methods

throwM :: Exception e => e -> UnionizeC b m a #

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

Defined in Control.Effect.Exceptional

Methods

throwM :: Exception e => e -> ExceptionallyC eff exc m a #

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

Defined in Control.Effect.BaseControl

Methods

throwM :: Exception e => e -> GainBaseControlC b z m a #

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 (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 (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 :: (Type -> Type) -> Type -> Type) 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 (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 s, MonadCatch m) => MonadCatch (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

catch :: Exception e => TellC s m a -> (e -> TellC s m a) -> TellC s 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 (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 (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 (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 (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, 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 :: (Type -> Type) -> Type -> Type) 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 (ExceptionallyC eff exc m) Source # 
Instance details

Defined in Control.Effect.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 #

class MonadCatch m => MonadMask (m :: Type -> Type) #

A class for monads which provide for the ability to account for all possible exit points from a computation, and to mask asynchronous exceptions. Continuation-based monads are invalid instances of this class.

Instances should ensure that, in the following code:

fg = f `finally` g

The action g is called regardless of what occurs within f, including async exceptions. Some monads allow f to abort the computation via other effects than throwing an exception. For simplicity, we will consider aborting and throwing an exception to be two forms of "throwing an error".

If f and g both throw an error, the error thrown by fg depends on which errors we're talking about. In a monad transformer stack, the deeper layers override the effects of the inner layers; for example, ExceptT e1 (Except e2) a represents a value of type Either e2 (Either e1 a), so throwing both an e1 and an e2 will result in Left e2. If f and g both throw an error from the same layer, instances should ensure that the error from g wins.

Effects other than throwing an error are also overriden by the deeper layers. For example, StateT s Maybe a represents a value of type s -> Maybe (a, s), so if an error thrown from f causes this function to return Nothing, any changes to the state which f also performed will be erased. As a result, g will see the state as it was before f. Once g completes, f's error will be rethrown, so g' state changes will be erased as well. This is the normal interaction between effects in a monad transformer stack.

By contrast, lifted-base's version of finally always discards all of g's non-IO effects, and g never sees any of f's non-IO effects, regardless of the layer ordering and regardless of whether f throws an error. This is not the result of interacting effects, but a consequence of MonadBaseControl's approach.

Minimal complete definition

mask, uninterruptibleMask, generalBracket

Instances

Instances details
MonadMask IO 
Instance details

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

generalBracket :: IO a -> (a -> ExitCase b -> IO c) -> (a -> IO b) -> IO (b, c) #

e ~ SomeException => MonadMask (Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

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

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

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

MonadMask m => MonadMask (MaybeT m)

Since: exceptions-0.10.0

Instance details

Defined in Control.Monad.Catch

Methods

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

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

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

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

Defined in Control.Effect.Fail

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

Defined in Control.Effect.Alt

MonadMask m => MonadMask (ExceptT e m)

Since: exceptions-0.9.0

Instance details

Defined in Control.Monad.Catch

Methods

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

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

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

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

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b #

uninterruptibleMask :: ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b #

generalBracket :: WriterT w m a -> (a -> ExitCase b -> WriterT w m c) -> (a -> WriterT w m b) -> WriterT w m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b #

uninterruptibleMask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b #

generalBracket :: StateT s m a -> (a -> ExitCase b -> StateT s m c) -> (a -> StateT s m b) -> StateT s m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

uninterruptibleMask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

generalBracket :: ReaderT r m a -> (a -> ExitCase b -> ReaderT r m c) -> (a -> ReaderT r m b) -> ReaderT r m (b, c) #

(Error e, MonadMask m) => MonadMask (ErrorT e m) 
Instance details

Defined in Control.Monad.Catch

Methods

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

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

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

MonadMask m => MonadMask (IdentityT m) 
Instance details

Defined in Control.Monad.Catch

Methods

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

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

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

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

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b #

uninterruptibleMask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b #

generalBracket :: StateT s m a -> (a -> ExitCase b -> StateT s m c) -> (a -> StateT s m b) -> StateT s m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b #

uninterruptibleMask :: ((forall a. WriterT w m a -> WriterT w m a) -> WriterT w m b) -> WriterT w m b #

generalBracket :: WriterT w m a -> (a -> ExitCase b -> WriterT w m c) -> (a -> WriterT w m b) -> WriterT w m (b, c) #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

mask :: ((forall a. CompositionC ts m a -> CompositionC ts m a) -> CompositionC ts m b) -> CompositionC ts m b #

uninterruptibleMask :: ((forall a. CompositionC ts m a -> CompositionC ts m a) -> CompositionC ts m b) -> CompositionC ts m b #

generalBracket :: CompositionC ts m a -> (a -> ExitCase b -> CompositionC ts m c) -> (a -> CompositionC ts m b) -> CompositionC ts m (b, c) #

Effs '[Mask :: (Type -> Type) -> Type -> Type, Bracket, ErrorIO :: (Type -> Type) -> Type -> Type] m => MonadMask (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

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

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

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

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

Defined in Control.Effect.Carrier.Internal.Interpret

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

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

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

Defined in Control.Effect.Embed

Methods

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

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

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

(Monoid s, MonadMask m) => MonadMask (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. WriterLazyC s m a -> WriterLazyC s m a) -> WriterLazyC s m b) -> WriterLazyC s m b #

uninterruptibleMask :: ((forall a. WriterLazyC s m a -> WriterLazyC s m a) -> WriterLazyC s m b) -> WriterLazyC s m b #

generalBracket :: WriterLazyC s m a -> (a -> ExitCase b -> WriterLazyC s m c) -> (a -> WriterLazyC s m b) -> WriterLazyC s m (b, c) #

(Monoid s, MonadMask m) => MonadMask (ListenLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. ListenLazyC s m a -> ListenLazyC s m a) -> ListenLazyC s m b) -> ListenLazyC s m b #

uninterruptibleMask :: ((forall a. ListenLazyC s m a -> ListenLazyC s m a) -> ListenLazyC s m b) -> ListenLazyC s m b #

generalBracket :: ListenLazyC s m a -> (a -> ExitCase b -> ListenLazyC s m c) -> (a -> ListenLazyC s m b) -> ListenLazyC s m (b, c) #

(Monoid s, MonadMask m) => MonadMask (TellLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. TellLazyC s m a -> TellLazyC s m a) -> TellLazyC s m b) -> TellLazyC s m b #

uninterruptibleMask :: ((forall a. TellLazyC s m a -> TellLazyC s m a) -> TellLazyC s m b) -> TellLazyC s m b #

generalBracket :: TellLazyC s m a -> (a -> ExitCase b -> TellLazyC s m c) -> (a -> TellLazyC s m b) -> TellLazyC s m (b, c) #

(Monoid s, MonadMask m) => MonadMask (WriterC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. WriterC s m a -> WriterC s m a) -> WriterC s m b) -> WriterC s m b #

uninterruptibleMask :: ((forall a. WriterC s m a -> WriterC s m a) -> WriterC s m b) -> WriterC s m b #

generalBracket :: WriterC s m a -> (a -> ExitCase b -> WriterC s m c) -> (a -> WriterC s m b) -> WriterC s m (b, c) #

(Monoid s, MonadMask m) => MonadMask (ListenC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. ListenC s m a -> ListenC s m a) -> ListenC s m b) -> ListenC s m b #

uninterruptibleMask :: ((forall a. ListenC s m a -> ListenC s m a) -> ListenC s m b) -> ListenC s m b #

generalBracket :: ListenC s m a -> (a -> ExitCase b -> ListenC s m c) -> (a -> ListenC s m b) -> ListenC s m (b, c) #

(Monoid s, MonadMask m) => MonadMask (TellC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. TellC s m a -> TellC s m a) -> TellC s m b) -> TellC s m b #

uninterruptibleMask :: ((forall a. TellC s m a -> TellC s m a) -> TellC s m b) -> TellC s m b #

generalBracket :: TellC s m a -> (a -> ExitCase b -> TellC s m c) -> (a -> TellC s m b) -> TellC s m (b, c) #

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

Defined in Control.Effect.Internal.Unlift

Methods

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

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

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

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

Defined in Control.Effect.Internal.State

Methods

mask :: ((forall a. StateLazyC s m a -> StateLazyC s m a) -> StateLazyC s m b) -> StateLazyC s m b #

uninterruptibleMask :: ((forall a. StateLazyC s m a -> StateLazyC s m a) -> StateLazyC s m b) -> StateLazyC s m b #

generalBracket :: StateLazyC s m a -> (a -> ExitCase b -> StateLazyC s m c) -> (a -> StateLazyC s m b) -> StateLazyC s m (b, c) #

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

Defined in Control.Effect.Internal.State

Methods

mask :: ((forall a. StateC s m a -> StateC s m a) -> StateC s m b) -> StateC s m b #

uninterruptibleMask :: ((forall a. StateC s m a -> StateC s m a) -> StateC s m b) -> StateC s m b #

generalBracket :: StateC s m a -> (a -> ExitCase b -> StateC s m c) -> (a -> StateC s m b) -> StateC s m (b, c) #

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

Defined in Control.Effect.Internal.Regional

Methods

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

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

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

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

Defined in Control.Effect.Internal.Reader

Methods

mask :: ((forall a. ReaderC i m a -> ReaderC i m a) -> ReaderC i m b) -> ReaderC i m b #

uninterruptibleMask :: ((forall a. ReaderC i m a -> ReaderC i m a) -> ReaderC i m b) -> ReaderC i m b #

generalBracket :: ReaderC i m a -> (a -> ExitCase b -> ReaderC i m c) -> (a -> ReaderC i m b) -> ReaderC i m (b, c) #

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

Defined in Control.Effect.Internal.Optional

Methods

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

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

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

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

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

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

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

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) #

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) #

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

Defined in Control.Effect.Internal.BaseControl

Methods

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

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

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

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

Defined in Control.Effect.Internal.Intercept

Methods

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

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

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

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

Defined in Control.Effect.Fail

Methods

mask :: ((forall a. InterpretFailC h m a -> InterpretFailC h m a) -> InterpretFailC h m b) -> InterpretFailC h m b #

uninterruptibleMask :: ((forall a. InterpretFailC h m a -> InterpretFailC h m a) -> InterpretFailC h m b) -> InterpretFailC h m b #

generalBracket :: InterpretFailC h m a -> (a -> ExitCase b -> InterpretFailC h m c) -> (a -> InterpretFailC h m b) -> InterpretFailC h m (b, c) #

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

Defined in Control.Effect.Alt

Methods

mask :: ((forall a. InterpretAltC h m a -> InterpretAltC h m a) -> InterpretAltC h m b) -> InterpretAltC h m b #

uninterruptibleMask :: ((forall a. InterpretAltC h m a -> InterpretAltC h m a) -> InterpretAltC h m b) -> InterpretAltC h m b #

generalBracket :: InterpretAltC h m a -> (a -> ExitCase b -> InterpretAltC h m c) -> (a -> InterpretAltC h m b) -> InterpretAltC h m (b, c) #

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

Defined in Control.Effect.Internal

Methods

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

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

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

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

Defined in Control.Effect.Carrier.Internal.Intro

Methods

mask :: ((forall a. IntroC top new m a -> IntroC top new m a) -> IntroC top new m b) -> IntroC top new m b #

uninterruptibleMask :: ((forall a. IntroC top new m a -> IntroC top new m a) -> IntroC top new m b) -> IntroC top new m b #

generalBracket :: IntroC top new m a -> (a -> ExitCase b -> IntroC top new m c) -> (a -> IntroC top new m b) -> IntroC top new m (b, c) #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

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

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

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

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

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

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

Defined in Control.Effect.Union

Methods

mask :: ((forall a. UnionC l m a -> UnionC l m a) -> UnionC l m b) -> UnionC l m b #

uninterruptibleMask :: ((forall a. UnionC l m a -> UnionC l m a) -> UnionC l m b) -> UnionC l m b #

generalBracket :: UnionC l m a -> (a -> ExitCase b -> UnionC l m c) -> (a -> UnionC l m b) -> UnionC l m (b, c) #

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

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

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

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b #

uninterruptibleMask :: ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b #

generalBracket :: RWST r w s m a -> (a -> ExitCase b -> RWST r w s m c) -> (a -> RWST r w s m b) -> RWST r w s m (b, c) #

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

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b #

uninterruptibleMask :: ((forall a. RWST r w s m a -> RWST r w s m a) -> RWST r w s m b) -> RWST r w s m b #

generalBracket :: RWST r w s m a -> (a -> ExitCase b -> RWST r w s m c) -> (a -> RWST r w s m b) -> RWST r w s m (b, c) #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

mask :: ((forall a. ComposeT t u m a -> ComposeT t u m a) -> ComposeT t u m b) -> ComposeT t u m b #

uninterruptibleMask :: ((forall a. ComposeT t u m a -> ComposeT t u m a) -> ComposeT t u m b) -> ComposeT t u m b #

generalBracket :: ComposeT t u m a -> (a -> ExitCase b -> ComposeT t u m c) -> (a -> ComposeT t u m b) -> ComposeT t u m (b, c) #

(Reifies s (ReifiedEffAlgebra Bracket m), Monad m) => MonadMask (ViaAlg s Bracket m) Source # 
Instance details

Defined in Control.Effect.Type.Bracket

Methods

mask :: ((forall a. ViaAlg s Bracket m a -> ViaAlg s Bracket m a) -> ViaAlg s Bracket m b) -> ViaAlg s Bracket m b #

uninterruptibleMask :: ((forall a. ViaAlg s Bracket m a -> ViaAlg s Bracket m a) -> ViaAlg s Bracket m b) -> ViaAlg s Bracket m b #

generalBracket :: ViaAlg s Bracket m a -> (a -> ExitCase b -> ViaAlg s Bracket m c) -> (a -> ViaAlg s Bracket m b) -> ViaAlg s Bracket m (b, c) #

(Reifies s (ReifiedEffAlgebra (Mask :: (Type -> Type) -> Type -> Type) m), Monad m) => MonadMask (ViaAlg s (Mask :: (Type -> Type) -> Type -> Type) m) Source # 
Instance details

Defined in Control.Effect.Type.Mask

Methods

mask :: ((forall a. ViaAlg s Mask m a -> ViaAlg s Mask m a) -> ViaAlg s Mask m b) -> ViaAlg s Mask m b #

uninterruptibleMask :: ((forall a. ViaAlg s Mask m a -> ViaAlg s Mask m a) -> ViaAlg s Mask m b) -> ViaAlg s Mask m b #

generalBracket :: ViaAlg s Mask m a -> (a -> ExitCase b -> ViaAlg s Mask m c) -> (a -> ViaAlg s Mask m b) -> ViaAlg s Mask m (b, c) #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

mask :: ((forall a. ReinterpretC h e new m a -> ReinterpretC h e new m a) -> ReinterpretC h e new m b) -> ReinterpretC h e new m b #

uninterruptibleMask :: ((forall a. ReinterpretC h e new m a -> ReinterpretC h e new m a) -> ReinterpretC h e new m b) -> ReinterpretC h e new m b #

generalBracket :: ReinterpretC h e new m a -> (a -> ExitCase b -> ReinterpretC h e new m c) -> (a -> ReinterpretC h e new m b) -> ReinterpretC h e new m (b, c) #

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

Defined in Control.Effect.Union

Methods

mask :: ((forall a. UnionizeC b m a -> UnionizeC b m a) -> UnionizeC b m b0) -> UnionizeC b m b0 #

uninterruptibleMask :: ((forall a. UnionizeC b m a -> UnionizeC b m a) -> UnionizeC b m b0) -> UnionizeC b m b0 #

generalBracket :: UnionizeC b m a -> (a -> ExitCase b0 -> UnionizeC b m c) -> (a -> UnionizeC b m b0) -> UnionizeC b m (b0, c) #

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

Defined in Control.Effect.Exceptional

Methods

mask :: ((forall a. ExceptionallyC eff exc m a -> ExceptionallyC eff exc m a) -> ExceptionallyC eff exc m b) -> ExceptionallyC eff exc m b #

uninterruptibleMask :: ((forall a. ExceptionallyC eff exc m a -> ExceptionallyC eff exc m a) -> ExceptionallyC eff exc m b) -> ExceptionallyC eff exc m b #

generalBracket :: ExceptionallyC eff exc m a -> (a -> ExitCase b -> ExceptionallyC eff exc m c) -> (a -> ExceptionallyC eff exc m b) -> ExceptionallyC eff exc m (b, c) #

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

Defined in Control.Effect.BaseControl

Methods

mask :: ((forall a. GainBaseControlC b z m a -> GainBaseControlC b z m a) -> GainBaseControlC b z m b0) -> GainBaseControlC b z m b0 #

uninterruptibleMask :: ((forall a. GainBaseControlC b z m a -> GainBaseControlC b z m a) -> GainBaseControlC b z m b0) -> GainBaseControlC b z m b0 #

generalBracket :: GainBaseControlC b z m a -> (a -> ExitCase b0 -> GainBaseControlC b z m c) -> (a -> GainBaseControlC b z m b0) -> GainBaseControlC b z m (b0, c) #

class (Applicative b, Applicative m, Monad b, Monad m) => MonadBase (b :: Type -> Type) (m :: Type -> Type) | m -> b #

Minimal complete definition

liftBase

Instances

Instances details
MonadBase [] [] 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: [α] -> [α] #

MonadBase Maybe Maybe 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: Maybe α -> Maybe α #

MonadBase IO IO 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: IO α -> IO α #

MonadBase Identity Identity 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: Identity α -> Identity α #

MonadBase STM STM 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: STM α -> STM α #

MonadBase b m => MonadBase b (MaybeT m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> MaybeT m α #

MonadBase b m => MonadBase b (ListT m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> ListT m α #

MonadBase b m => MonadBase b (ListT m) Source # 
Instance details

Defined in Control.Monad.Trans.List.Church

Methods

liftBase :: b α -> ListT m α #

MonadBase b m => MonadBase b (NonDetC m) Source # 
Instance details

Defined in Control.Effect.Internal.NonDet

Methods

liftBase :: b α -> NonDetC m α #

MonadBase b m => MonadBase b (CullCutC m) Source # 
Instance details

Defined in Control.Effect.Internal.NonDet

Methods

liftBase :: b α -> CullCutC m α #

MonadBase b m => MonadBase b (LogicC m) Source # 
Instance details

Defined in Control.Effect.Internal.NonDet

Methods

liftBase :: b α -> LogicC m α #

MonadBase b m => MonadBase b (InterpretFailSimpleC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

liftBase :: b α -> InterpretFailSimpleC m α #

MonadBase b m => MonadBase b (InterpretAltSimpleC m) Source # 
Instance details

Defined in Control.Effect.Alt

Methods

liftBase :: b α -> InterpretAltSimpleC m α #

Monad m => MonadBase m (Itself m) Source # 
Instance details

Defined in Control.Effect.Internal.Itself

Methods

liftBase :: m α -> Itself m α #

(Monoid w, MonadBase b m) => MonadBase b (WriterT w m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> WriterT w m α #

(Monoid w, MonadBase b m) => MonadBase b (WriterT w m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> WriterT w m α #

MonadBase b m => MonadBase b (StateT s m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> StateT s m α #

MonadBase b m => MonadBase b (StateT s m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> StateT s m α #

MonadBase b m => MonadBase b (SelectT r m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> SelectT r m α #

MonadBase b m => MonadBase b (ReaderT r m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> ReaderT r m α #

MonadBase b m => MonadBase b (IdentityT m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> IdentityT m α #

MonadBase b m => MonadBase b (ExceptT e m) 
Instance details

Defined in Control.Monad.Base

Methods

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

(Error e, MonadBase b m) => MonadBase b (ErrorT e m) 
Instance details

Defined in Control.Monad.Base

Methods

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

(Monoid w, MonadBase b m) => MonadBase b (AccumT w m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> AccumT w m α #

(Monad b, MonadBase b (CompositionBaseT ts m)) => MonadBase b (CompositionC ts m) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Compose

Methods

liftBase :: b α -> CompositionC ts m α #

MonadBase b m => MonadBase b (Effly m) Source # 
Instance details

Defined in Control.Effect.Internal.Effly

Methods

liftBase :: b α -> Effly m α #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

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

MonadBase b m => MonadBase b (RunMC m) Source # 
Instance details

Defined in Control.Effect.Embed

Methods

liftBase :: b α -> RunMC m α #

MonadBase b m => MonadBase b (WriterCPS s m) Source # 
Instance details

Defined in Control.Effect.Type.Internal.BaseControl

Methods

liftBase :: b α -> WriterCPS s m α #

(Monoid s, MonadBase b m) => MonadBase b (WriterLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> WriterLazyC s m α #

(Monoid s, MonadBase b m) => MonadBase b (ListenLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> ListenLazyC s m α #

(Monoid s, MonadBase b m) => MonadBase b (TellLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> TellLazyC s m α #

MonadBase b m => MonadBase b (WriterC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> WriterC s m α #

MonadBase b m => MonadBase b (ListenC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> ListenC s m α #

MonadBase b m => MonadBase b (TellC s m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> TellC s m α #

MonadBase b m => MonadBase b (StateLazyC s m) Source # 
Instance details

Defined in Control.Effect.Internal.State

Methods

liftBase :: b α -> StateLazyC s m α #

MonadBase b m => MonadBase b (StateC s m) Source # 
Instance details

Defined in Control.Effect.Internal.State

Methods

liftBase :: b α -> StateC s m α #

MonadBase b m => MonadBase b (ReaderC i m) Source # 
Instance details

Defined in Control.Effect.Internal.Reader

Methods

liftBase :: b α -> ReaderC i m α #

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

Defined in Control.Effect.Internal.Newtype

Methods

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

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

Defined in Control.Effect.Internal.Error

Methods

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

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

Defined in Control.Effect.Internal.Error

Methods

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

MonadBase b m => MonadBase b (FreeT f m) Source # 
Instance details

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

Methods

liftBase :: b α -> FreeT f m α #

MonadBase b m => MonadBase b (ShiftFastC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

liftBase :: b α -> ShiftFastC r m α #

MonadBase b m => MonadBase b (ShiftC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

liftBase :: b α -> ShiftC r m α #

MonadBase b m => MonadBase b (ContFastC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

liftBase :: b α -> ContFastC r m α #

MonadBase b m => MonadBase b (ContC r m) Source # 
Instance details

Defined in Control.Effect.Internal.Cont

Methods

liftBase :: b α -> ContC r m α #

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

Defined in Control.Effect.Carrier.Internal.Stepped

Methods

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

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

Defined in Control.Effect.Internal.Intercept

Methods

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

MonadBase b m => MonadBase b (InterpretFailC h m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

liftBase :: b α -> InterpretFailC h m α #

MonadBase b m => MonadBase b (InterpretAltC h m) Source # 
Instance details

Defined in Control.Effect.Alt

Methods

liftBase :: b α -> InterpretAltC h m α #

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

Defined in Control.Effect.Internal

Methods

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

MonadBase b m => MonadBase b (ContT r m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> ContT r m α #

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

Defined in Control.Effect.Carrier.Internal.Intro

Methods

liftBase :: b α -> IntroC top new m α #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftBase :: b α -> ReinterpretSimpleC e new m α #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftBase :: b α -> InterpretC h e m α #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftBase :: b α -> InterpretPrimC s e m α #

MonadBase b m => MonadBase b (UnionC l m) Source # 
Instance details

Defined in Control.Effect.Union

Methods

liftBase :: b α -> UnionC l m α #

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

Defined in Control.Effect.Internal.Newtype

Methods

liftBase :: b α -> WrapC e e' m α #

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

Defined in Control.Monad.Base

Methods

liftBase :: b α -> RWST r w s m α #

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

Defined in Control.Monad.Base

Methods

liftBase :: b α -> RWST r w s m α #

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

Defined in Control.Effect.Carrier.Internal.Compose

Methods

liftBase :: b α -> ComposeT t u m α #

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

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftBase :: b α -> ReinterpretC h e new m α #

MonadBase b' m => MonadBase b' (UnionizeC b m) Source # 
Instance details

Defined in Control.Effect.Union

Methods

liftBase :: b' α -> UnionizeC b m α #

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

Defined in Control.Effect.Exceptional

Methods

liftBase :: b α -> ExceptionallyC eff exc m α #

(Reifies sHandler (HandlerCState p m z), Monad z, Monad m) => MonadBase m (HandlerC sHandler sReform r p m z) Source # 
Instance details

Defined in Control.Effect.Carrier.Internal.Interpret

Methods

liftBase :: m α -> HandlerC sHandler sReform r p m z α #

(Monad m, MonadBase b z, Coercible z m) => MonadBase b (GainBaseControlC b z m) Source # 
Instance details

Defined in Control.Effect.BaseControl

Methods

liftBase :: b α -> GainBaseControlC b z m α #

MonadBase (Either e) (Either e) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: Either e α -> Either e α #

MonadBase (ST s) (ST s) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: ST s α -> ST s α #

MonadBase (ST s) (ST s) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: ST s α -> ST s α #

MonadBase ((->) r :: Type -> Type) ((->) r :: Type -> Type) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: (r -> α) -> r -> α #

class MonadBase b m => MonadBaseControl (b :: Type -> Type) (m :: Type -> Type) | m -> b #

Writing instances

The usual way to write a MonadBaseControl instance for a transformer stack over a base monad B is to write an instance MonadBaseControl B B for the base monad, and MonadTransControl T instances for every transformer T. Instances for MonadBaseControl are then simply implemented using ComposeSt, defaultLiftBaseWith, defaultRestoreM.

Minimal complete definition

liftBaseWith, restoreM

Instances

Instances details
MonadBaseControl [] [] 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM [] a #

Methods

liftBaseWith :: (RunInBase [] [] -> [a]) -> [a] #

restoreM :: StM [] a -> [a] #

MonadBaseControl Maybe Maybe 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM Maybe a #

MonadBaseControl IO IO 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM IO a #

Methods

liftBaseWith :: (RunInBase IO IO -> IO a) -> IO a #

restoreM :: StM IO a -> IO a #

MonadBaseControl Identity Identity 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM Identity a #

MonadBaseControl STM STM 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM STM a #

Methods

liftBaseWith :: (RunInBase STM STM -> STM a) -> STM a #

restoreM :: StM STM a -> STM a #

MonadBaseControl b m => MonadBaseControl b (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM (MaybeT m) a #

Methods

liftBaseWith :: (RunInBase (MaybeT m) b -> b a) -> MaybeT m a #

restoreM :: StM (MaybeT m) a -> MaybeT m a #

MonadBaseControl b m => MonadBaseControl b (ListT m) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM (ListT m) a #

Methods

liftBaseWith :: (RunInBase (ListT m) b -> b a) -> ListT m a #

restor