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

Control.Effect.Writer

Synopsis

Effects

data Tell o :: Effect where Source #

An effect for arbitrary output.

Constructors

Tell :: o -> Tell o m () 

Instances

Instances details
(Monoid w, Carrier m, Threaders '[SteppedThreads] m p) => PrimHandler ListenSteppedH (ListenPrim w) (SteppedC (Tell w) m) Source # 
Instance details

Defined in Control.Effect.Internal.Intercept

data Listen o :: Effect where Source #

An effect for hearing what a computation has to tell.

Constructors

Listen :: m a -> Listen o m (o, a) 

Instances

Instances details
Eff (ListenPrim w) m => Handler ListenSteppedH (Listen w) m Source # 
Instance details

Defined in Control.Effect.Internal.Intercept

newtype Pass o :: Effect where Source #

An effect for altering what a computation tells.

Constructors

Pass :: m (o -> o, a) -> Pass o m a 

type Writer o = Bundle '[Tell o, Listen o, Pass o] Source #

A pseudo-effect for connected Tell o, Listen o and Pass o effects.

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

Actions

tell :: Eff (Tell o) m => o -> m () Source #

listen :: Eff (Listen o) m => m a -> m (o, a) Source #

pass :: Eff (Pass o) m => m (o -> o, a) -> m a Source #

censor :: Eff (Pass o) m => (o -> o) -> m a -> m a Source #

Interpretations for Tell

runTell :: forall o m a p. (Monoid o, Carrier m, Threaders '[WriterThreads] m p) => TellC o m a -> m (o, a) Source #

Run a Tell o effect, where o is a Monoid, by accumulating all the uses of tell.

You may want to combine this with tellIntoTell.

Unlike runListen and runWriter, this does not provide the ability to interact with the tells through listen and pass; but also doesn't impose any primitive effects, meaning runTell doesn't restrict what interpreters are run before it.

Derivs (TellC o m) = Tell o ': Derivs m
Prims  (TellC o m) = Prims m

This produces the final accumulation o strictly. See runTellLazy for a lazy variant of this.

runTellLazy :: forall o m a p. (Monoid o, Carrier m, Threaders '[WriterLazyThreads] m p) => TellLazyC o m a -> m (o, a) Source #

Run a Tell o effect, where o is a Monoid, by accumulating all the uses of tell lazily.

Derivs (TellLazyC o m) = Tell o ': Derivs m
Prims  (TellLazyC o m) = Prims m

This is a variant of runTell that produces the final accumulation lazily. Use this only if you need the laziness, as this would otherwise incur an unneccesary space leak.

runTellList :: forall o m a p. (Carrier m, Threaders '[WriterThreads] m p) => TellListC o m a -> m ([o], a) Source #

Run a Tell o effect by gathering the tells into a list.

Derivs (TellListC o m) = Tell o ': Derivs m
Prims  (TellListC o m) = Prims m

The resulting list is produced strictly. See runTellListLazy for a lazy variant.

runTellListLazy :: forall o m a p. (Carrier m, Threaders '[WriterLazyThreads] m p) => TellListLazyC o m a -> m ([o], a) Source #

Run a Tell o by gathering the tells into a list.

Derivs (TellListLazyC o m) = Tell o ': Derivs m
Prims  (TellListLazyC o m) = Prims m

This is a variant of runTellList that produces the final list lazily. Use this only if you need the laziness, as this would otherwise incur an unneccesary space leak.

tellToIO :: forall o m a. (Monoid o, Eff (Embed IO) m) => InterpretReifiedC (Tell o) m a -> m (o, a) Source #

Run a Tell o effect where o is a Monoid by accumulating uses of tell through atomic operations in IO.

You may want to combine this with tellIntoTell.

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

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

runTellIORef :: forall o m a. (Monoid o, Eff (Embed IO) m) => IORef o -> InterpretReifiedC (Tell o) m a -> m a Source #

Run a Tell o effect where o is a Monoid by accumulating uses of tell through using atomic operations in IO over the provided IORef.

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

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

runTellTVar :: forall o m a. (Monoid o, Eff (Embed IO) m) => TVar o -> InterpretReifiedC (Tell o) m a -> m a Source #

Run a Tell o effect where o is a Monoid by accumulating uses of tell through using atomic operations in IO over the provided TVar.

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

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

runTellAction :: forall o m a. Carrier m => (o -> m ()) -> InterpretReifiedC (Tell o) m a -> m a Source #

Run a Tell effect by providing an action to be executed at each use of tell.

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

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

tellIntoEndoTell :: (Monoid o, HeadEff (Tell (Endo o)) m) => TellIntoEndoTellC o m a -> m a Source #

Rewrite a Tell o effect into a Tell (Endo o) effect.

This effectively right-associates all uses of tell, which asymptotically improves performance if the time complexity of <> for the Monoid depends only on the size of the first argument. In particular, you should use this (if you can be bothered) if the monoid is a list, such as String.

Usage is to combine this with the Tell interpreter of your choice, followed by fromEndoWriter, like this:

   run
 $ ...
 $ fromEndoWriter
 $ runTell
 $ tellIntoEndoTell @String -- The Monoid must be specified
 $ ...

tellToTell :: forall o o' m a. Eff (Tell o') m => (o -> o') -> InterpretReifiedC (Tell o) m a -> m a Source #

Transform a Tell effect into another Tell effect by providing a function to transform the type told.

This is useful to transform a Tell o effect where o isn't a Monoid into a Tell o' effect where o' is a Monoid, and thus can be interpreted using the various Monoidal Tell interpreters.

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

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

tellIntoTell :: forall o o' m a. HeadEff (Tell o') m => (o -> o') -> ReinterpretReifiedC (Tell o) '[Tell o'] m a -> m a Source #

Rewrite a Tell effect into another Tell effect on top of the effect stack by providing a function to transform the type told.

This is useful to rewrite a Tell o effect where o isn't a Monoid into a Tell t effect where t is a Monoid, and thus can be interpreted using the various Monoidal Tell interpreters.

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

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

ignoreTell :: forall o m a. Carrier m => IgnoreTellC o m a -> m a Source #

Run a Tell effect by ignoring it, doing no output at all.

Simple variants of interpretations for Tell

tellToIOSimple :: forall o m a p. (Monoid o, Eff (Embed IO) m, Threaders '[ReaderThreads] m p) => InterpretSimpleC (Tell o) m a -> m (o, a) Source #

Run a Tell o effect where o is a Monoid by accumulating uses of tell through atomic operations in IO.

You may want to combine this with tellIntoTellSimple.

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

runTellIORefSimple :: forall o m a p. (Monoid o, Eff (Embed IO) m, Threaders '[ReaderThreads] m p) => IORef o -> InterpretSimpleC (Tell o) m a -> m a Source #

Run a Tell o effect where o is a Monoid by accumulating uses of tell through using atomic operations in IO over the provided IORef.

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

runTellTVarSimple :: forall o m a p. (Monoid o, Eff (Embed IO) m, Threaders '[ReaderThreads] m p) => TVar o -> InterpretSimpleC (Tell o) m a -> m a Source #

Run a Tell o effect where o is a Monoid by accumulating uses of tell through using atomic operations in IO over the provided TVar.

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

runTellActionSimple :: forall o m a p. (Carrier m, Threaders '[ReaderThreads] m p) => (o -> m ()) -> InterpretSimpleC (Tell o) m a -> m a Source #

Run a Tell effect by providing an action to be executed at each use of tell.

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

tellToTellSimple :: forall o o' m a p. (Eff (Tell o') m, Threaders '[ReaderThreads] m p) => (o -> o') -> InterpretSimpleC (Tell o) m a -> m a Source #

Transform a Tell effect into another Tell effect by providing a function to transform the type told.

This is useful to transform a Tell o where o isn't a Monoid into a Tell p effect where p is a Monoid, and thus can be interpreted using the various Monoidal Tell interpreters.

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

tellIntoTellSimple :: forall o o' m a p. (HeadEff (Tell o') m, Threaders '[ReaderThreads] m p) => (o -> o') -> ReinterpretSimpleC (Tell o) '[Tell o'] m a -> m a Source #

Rewrite a Tell effect into another Tell effect on top of the effect stack by providing a function to transform the type told.

This is useful to rewrite a Tell o effect where o isn't a Monoid into a Tell o' effect where o' is a Monoid, and thus can be interpreted using the various Monoidal Tell interpreters.

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

Interpretations for Tell + Listen

runListen :: forall o m a p. (Monoid o, Carrier m, Threaders '[WriterThreads] m p) => ListenC o m a -> m (o, a) Source #

Run connected Listen o and Tell o effects, where o is a Monoid, by accumulating all the uses of tell.

Unlike runWriter, this does not provide the power of pass; but because of that, it also doesn't impose Pass as a primitive effect, meaning a larger variety of interpreters may be run before runListen compared to runWriter.

Derivs (ListenC o m) = Listen o ': Tell o ': Derivs m
Prims  (ListenC o m) = ListenPrim o ': Prims m

This produces the final accumulation strictly. See runListenLazy for a lazy variant of this.

runListenLazy :: forall o m a p. (Monoid o, Carrier m, Threaders '[WriterThreads] m p) => ListenLazyC o m a -> m (o, a) Source #

Run connected Listen o and Tell o effects, where o is a Monoid, by accumulating all the uses of tell lazily.

Derivs (ListenLazyC o m) = Listen o ': Tell o ': Derivs m
Prims  (ListenLazyC o m) = ListenPrim o ': Prims m

This is a variant of runListen that produces the final accumulation lazily. Use this only if you need the laziness, as this would otherwise incur an unneccesary space leak.

listenToIO :: forall o m a p. (Monoid o, Eff (Embed IO) m, MonadMask m, Threaders '[ReaderThreads] m p) => ListenTVarC o m a -> m (o, a) Source #

Run connected Listen o and Tell o effects by accumulating uses of tell through using atomic operations in IO.

Derivs (ListenTVarC o m) = Listen o ': Tell o ': Derivs m
Prims  (ListenTVarC o m) = ListenPrim o ': ReaderPrim (o -> STM ()) ': Prims m

Note that unlike tellToIO, this does not have a higher-rank type.

runListenTVar :: forall o m a p. (Monoid o, Eff (Embed IO) m, MonadMask m, Threaders '[ReaderThreads] m p) => TVar o -> ListenTVarC o m a -> m a Source #

Run connected Listen o and Tell o effects by accumulating uses of tell through using atomic operations in IO over the provided TVar.

Derivs (ListenTVarC o m) = Listen o : Tell o ': Derivs m
Prims  (ListenTVarC o m) = ListenPrim o ': ReaderPrim (o -> STM ()) ': Prims m

Note that unlike runTellTVar, this does not have a higher-rank type.

listenIntoEndoListen :: (Monoid o, HeadEffs '[Listen (Endo o), Tell (Endo o)] m) => ListenIntoEndoListenC o m a -> m a Source #

Rewrite connected Listen o and Tell o effects into connected Listen (Endo o) and Tell (Endo o) effects.

This effectively right-associates all uses of tell, which asymptotically improves performance if the time complexity of <> for the Monoid depends only on the size of the first argument. In particular, you should use this (if you can be bothered) if the monoid is a list, such as String.

Usage is to combine this with the Listen interpreter of your choice, followed by fromEndoWriter, like this:

   run
 $ ...
 $ fromEndoWriter
 $ runListen
 $ listenIntoEndoListen @String -- The Monoid must be specified
 $ ...

Interpretations for Writer (Tell + Listen + Pass)

runWriter :: forall o m a p. (Monoid o, Carrier m, Threaders '[WriterThreads] m p) => WriterC o m a -> m (o, a) Source #

Run connected Pass o, Listen o and Tell o effects, -- i.e. Writer o -- where o is a Monoid, by accumulating all the uses of tell.

Pass o is a fairly restrictive primitive effect. Notably, runCont can't be used before runWriter. If you don't need pass, consider using runTell or runListen instead.

Derivs (WriterC o m) = Pass o ': Listen o ': Tell o ': Derivs m
Prims  (WriterC o m) = WriterPrim o ': Prims m

This produces the final accumulation strictly. See runWriterLazy for a lazy variant of this.

runWriterLazy :: forall o m a p. (Monoid o, Carrier m, Threaders '[WriterLazyThreads] m p) => WriterLazyC o m a -> m (o, a) Source #

Run connected Pass o, Listen o and Tell o effects, -- i.e. Writer o -- where o is a Monoid, by accumulating all the uses of tell lazily.

Derivs (ListenLazyC o m) = Pass o ': Listen o ': Tell o ': Derivs m
Prims  (ListenLazyC o m) = WriterPrim o ': Prims m

This is a variant of runListen that produces the final accumulation lazily. Use this only if you need the laziness, as this would otherwise incur an unneccesary space leak.

writerToIO :: forall o m a p. (Monoid o, Eff (Embed IO) m, MonadMask m, Threaders '[ReaderThreads] m p) => WriterTVarC o m a -> m (o, a) Source #

Run connected Pass o, Listen o and Tell o effects -- i.e. Writer o -- by accumulating uses of tell through using atomic operations in IO.

Derivs (WriterTVarC o m) = Pass o ': Listen o : Tell o ': Derivs m
Prims  (WriterTVarC o m) = WriterPrim o ': ReaderPrim (o -> STM ()) ': Prims m

Note that unlike tellToIO, this does not have a higher-rank type.

runWriterTVar :: forall o m a p. (Monoid o, Eff (Embed IO) m, MonadMask m, Threaders '[ReaderThreads] m p) => TVar o -> WriterTVarC o m a -> m a Source #

Run connected Pass o, Listen o and Tell o effects -- i.e. Writer o -- by accumulating uses of tell through using atomic operations in IO over a TVar.

Derivs (WriterTVarC o m) = Pass o ': Listen o : Tell o ': Derivs m
Prims  (WriterTVarC o m) = WriterPrim o ': ReaderPrim (o -> STM ()) ': Prims m

Note that unlike runTellTVar, this does not have a higher-rank type.

writerToBracket :: forall o m a p. (Monoid o, Effs [Embed IO, Bracket] m, Threaders '[ReaderThreads] m p) => WriterToBracketC o m a -> m (o, a) Source #

Run connected Pass o, Listen o and Tell o effects -- i.e. Writer o -- by accumulating uses of tell through using atomic operations in IO, relying on the provided protection of Bracket for the implementation.

Derivs (WriterToBracketC o m) = Pass o ': Listen o : Tell o ': Derivs m
Prims  (WriterToBracketC o m) = ReaderPrim (o -> STM ()) ': Prims m

Note that unlike tellToIO, this does not have a higher-rank type.

writerToBracketTVar :: forall o m a p. (Monoid o, Effs [Embed IO, Bracket] m, Threaders '[ReaderThreads] m p) => TVar o -> WriterToBracketC o m a -> m a Source #

Run connected Pass o, Listen o and Tell o effects -- i.e. Writer o -- by accumulating uses of tell through using atomic operations in IO over a TVar, relying on the provided protection of Bracket for the implementation.

Derivs (WriterToBracketC o m) = Pass o ': Listen o : Tell o ': Derivs m
Prims  (WriterToBracketC o m) = ReaderPrim (o -> STM ()) ': Prims m

Note that unlike runTellTVar, this does not have a higher-rank type.

writerIntoEndoWriter :: (Monoid o, HeadEffs '[Pass (Endo o), Listen (Endo o), Tell (Endo o)] m) => WriterIntoEndoWriterC o m a -> m a Source #

Rewrite connected Pass o, Listen o and Tell o effects -- i.e. Writer o -- into connected Pass (Endo o), Listen (Endo o) and Tell (Endo o) effects on top of the effect stack -- i.e. Writer (Endo o).

This effectively right-associates all uses of tell, which asymptotically improves performance if the time complexity of <> for the Monoid depends only on the size of the first argument. In particular, you should use this (if you can be bothered) if the monoid is a list, such as String.

Usage is to combine this with the Writer interpreter of your choice, followed by fromEndoWriter, like this:

   run
 $ ...
 $ fromEndoWriter
 $ runWriter
 $ writerIntoEndoWriter @String -- The Monoid must be specified
 $ ...

Other utilities

fromEndoWriter :: (Monoid o, Functor f) => f (Endo o, a) -> f (o, a) Source #

Threading constraints

class (forall o. Monoid o => Threads (WriterT o) p) => WriterThreads p Source #

WriterThreads accepts the following primitive effects:

Instances

Instances details
(forall o. Monoid o => Threads (WriterT o) p) => WriterThreads p Source # 
Instance details

Defined in Control.Effect.Internal.Writer

class (forall o. Monoid o => Threads (WriterT o) p) => WriterLazyThreads p Source #

WriterLazyThreads accepts the following primitive effects:

Instances

Instances details
(forall o. Monoid o => Threads (WriterT o) p) => WriterLazyThreads p Source # 
Instance details

Defined in Control.Effect.Internal.Writer

MonadMask

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, Bracket, ErrorIO] 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 (EmbedC m) Source # 
Instance details

Defined in Control.Effect.Embed

Methods

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

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

generalBracket :: EmbedC m a -> (a -> ExitCase b -> EmbedC m c) -> (a -> EmbedC m b) -> EmbedC 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 o, MonadMask m) => MonadMask (WriterLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. WriterLazyC o m a -> WriterLazyC o m a) -> WriterLazyC o m b) -> WriterLazyC o m b #

uninterruptibleMask :: ((forall a. WriterLazyC o m a -> WriterLazyC o m a) -> WriterLazyC o m b) -> WriterLazyC o m b #

generalBracket :: WriterLazyC o m a -> (a -> ExitCase b -> WriterLazyC o m c) -> (a -> WriterLazyC o m b) -> WriterLazyC o m (b, c) #

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. ListenLazyC o m a -> ListenLazyC o m a) -> ListenLazyC o m b) -> ListenLazyC o m b #

uninterruptibleMask :: ((forall a. ListenLazyC o m a -> ListenLazyC o m a) -> ListenLazyC o m b) -> ListenLazyC o m b #

generalBracket :: ListenLazyC o m a -> (a -> ExitCase b -> ListenLazyC o m c) -> (a -> ListenLazyC o m b) -> ListenLazyC o m (b, c) #

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. TellLazyC o m a -> TellLazyC o m a) -> TellLazyC o m b) -> TellLazyC o m b #

uninterruptibleMask :: ((forall a. TellLazyC o m a -> TellLazyC o m a) -> TellLazyC o m b) -> TellLazyC o m b #

generalBracket :: TellLazyC o m a -> (a -> ExitCase b -> TellLazyC o m c) -> (a -> TellLazyC o m b) -> TellLazyC o m (b, c) #

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. WriterC o m a -> WriterC o m a) -> WriterC o m b) -> WriterC o m b #

uninterruptibleMask :: ((forall a. WriterC o m a -> WriterC o m a) -> WriterC o m b) -> WriterC o m b #

generalBracket :: WriterC o m a -> (a -> ExitCase b -> WriterC o m c) -> (a -> WriterC o m b) -> WriterC o m (b, c) #

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. ListenC o m a -> ListenC o m a) -> ListenC o m b) -> ListenC o m b #

uninterruptibleMask :: ((forall a. ListenC o m a -> ListenC o m a) -> ListenC o m b) -> ListenC o m b #

generalBracket :: ListenC o m a -> (a -> ExitCase b -> ListenC o m c) -> (a -> ListenC o m b) -> ListenC o m (b, c) #

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. TellC o m a -> TellC o m a) -> TellC o m b) -> TellC o m b #

uninterruptibleMask :: ((forall a. TellC o m a -> TellC o m a) -> TellC o m b) -> TellC o m b #

generalBracket :: TellC o m a -> (a -> ExitCase b -> TellC o m c) -> (a -> TellC o m b) -> TellC o 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 m), Monad m) => MonadMask (ViaAlg s Mask 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) #

Carriers

data TellC o m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (TellC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> TellC o m α #

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

Defined in Control.Effect.Internal.Writer

Associated Types

type StM (TellC o m) a #

Methods

liftBaseWith :: (RunInBase (TellC o m) b -> b a) -> TellC o m a #

restoreM :: StM (TellC o m) a -> TellC o m a #

MonadTrans (TellC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

lift :: Monad m => m a -> TellC o m a #

Monoid o => MonadTransControl (TellC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type StT (TellC o) a #

Methods

liftWith :: Monad m => (Run (TellC o) -> m a) -> TellC o m a #

restoreT :: Monad m => m (StT (TellC o) a) -> TellC o m a #

Monad m => Monad (TellC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

(>>=) :: TellC o m a -> (a -> TellC o m b) -> TellC o m b #

(>>) :: TellC o m a -> TellC o m b -> TellC o m b #

return :: a -> TellC o m a #

Functor m => Functor (TellC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fmap :: (a -> b) -> TellC o m a -> TellC o m b #

(<$) :: a -> TellC o m b -> TellC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> TellC o m a #

Monad m => Applicative (TellC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

pure :: a -> TellC o m a #

(<*>) :: TellC o m (a -> b) -> TellC o m a -> TellC o m b #

liftA2 :: (a -> b -> c) -> TellC o m a -> TellC o m b -> TellC o m c #

(*>) :: TellC o m a -> TellC o m b -> TellC o m b #

(<*) :: TellC o m a -> TellC o m b -> TellC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

empty :: TellC o m a #

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

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

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

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

Defined in Control.Effect.Internal.Writer

Methods

mzero :: TellC o m a #

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. TellC o m a -> TellC o m a) -> TellC o m b) -> TellC o m b #

uninterruptibleMask :: ((forall a. TellC o m a -> TellC o m a) -> TellC o m b) -> TellC o m b #

generalBracket :: TellC o m a -> (a -> ExitCase b -> TellC o m c) -> (a -> TellC o m b) -> TellC o m (b, c) #

(Carrier m, Monoid o, Threads (WriterT o) (Prims m)) => Carrier (TellC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type Derivs (TellC o m) :: [Effect] Source #

type Prims (TellC o m) :: [Effect] Source #

Methods

algPrims :: Algebra' (Prims (TellC o m)) (TellC o m) a Source #

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

algDerivs :: Algebra' (Derivs (TellC o m)) (TellC o m) a Source #

type StT (TellC o) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StT (TellC o) a = (a, o)
type Derivs (TellC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Derivs (TellC o m) = Tell o ': Derivs m
type Prims (TellC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Prims (TellC o m) = Prims m
type StM (TellC o m) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StM (TellC o m) a = StM m (a, o)

data TellLazyC o m a Source #

Instances

Instances details
(Monoid o, MonadBase b m) => MonadBase b (TellLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> TellLazyC o m α #

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

Defined in Control.Effect.Internal.Writer

Associated Types

type StM (TellLazyC o m) a #

Methods

liftBaseWith :: (RunInBase (TellLazyC o m) b -> b a) -> TellLazyC o m a #

restoreM :: StM (TellLazyC o m) a -> TellLazyC o m a #

Monoid o => MonadTrans (TellLazyC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

lift :: Monad m => m a -> TellLazyC o m a #

Monoid o => MonadTransControl (TellLazyC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type StT (TellLazyC o) a #

Methods

liftWith :: Monad m => (Run (TellLazyC o) -> m a) -> TellLazyC o m a #

restoreT :: Monad m => m (StT (TellLazyC o) a) -> TellLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

(>>=) :: TellLazyC o m a -> (a -> TellLazyC o m b) -> TellLazyC o m b #

(>>) :: TellLazyC o m a -> TellLazyC o m b -> TellLazyC o m b #

return :: a -> TellLazyC o m a #

Functor m => Functor (TellLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fmap :: (a -> b) -> TellLazyC o m a -> TellLazyC o m b #

(<$) :: a -> TellLazyC o m b -> TellLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> TellLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

pure :: a -> TellLazyC o m a #

(<*>) :: TellLazyC o m (a -> b) -> TellLazyC o m a -> TellLazyC o m b #

liftA2 :: (a -> b -> c) -> TellLazyC o m a -> TellLazyC o m b -> TellLazyC o m c #

(*>) :: TellLazyC o m a -> TellLazyC o m b -> TellLazyC o m b #

(<*) :: TellLazyC o m a -> TellLazyC o m b -> TellLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

empty :: TellLazyC o m a #

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

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

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

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

Defined in Control.Effect.Internal.Writer

Methods

mzero :: TellLazyC o m a #

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. TellLazyC o m a -> TellLazyC o m a) -> TellLazyC o m b) -> TellLazyC o m b #

uninterruptibleMask :: ((forall a. TellLazyC o m a -> TellLazyC o m a) -> TellLazyC o m b) -> TellLazyC o m b #

generalBracket :: TellLazyC o m a -> (a -> ExitCase b -> TellLazyC o m c) -> (a -> TellLazyC o m b) -> TellLazyC o m (b, c) #

(Monoid o, Carrier m, Threads (WriterT o) (Prims m)) => Carrier (TellLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type Derivs (TellLazyC o m) :: [Effect] Source #

type Prims (TellLazyC o m) :: [Effect] Source #

type StT (TellLazyC o) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StT (TellLazyC o) a = StT (WriterT o) a
type Derivs (TellLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Derivs (TellLazyC o m) = Tell o ': Derivs m
type Prims (TellLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Prims (TellLazyC o m) = Prims m
type StM (TellLazyC o m) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StM (TellLazyC o m) a = StM (WriterT o m) a

type TellListC o = CompositionC '[ReinterpretC TellListH (Tell o) '[Tell (Dual [o])], TellC (Dual [o])] Source #

type TellListLazyC o = CompositionC '[ReinterpretC TellListLazyH (Tell o) '[Tell (Endo [o])], TellLazyC (Endo [o])] Source #

type TellIntoEndoTellC o = ReinterpretC WriterToEndoWriterH (Tell o) '[Tell (Endo o)] Source #

type IgnoreTellC o = InterpretC IgnoreTellH (Tell o) Source #

data ListenC o m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (ListenC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> ListenC o m α #

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

Defined in Control.Effect.Internal.Writer

Associated Types

type StM (ListenC o m) a #

Methods

liftBaseWith :: (RunInBase (ListenC o m) b -> b a) -> ListenC o m a #

restoreM :: StM (ListenC o m) a -> ListenC o m a #

MonadTrans (ListenC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

lift :: Monad m => m a -> ListenC o m a #

Monoid o => MonadTransControl (ListenC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type StT (ListenC o) a #

Methods

liftWith :: Monad m => (Run (ListenC o) -> m a) -> ListenC o m a #

restoreT :: Monad m => m (StT (ListenC o) a) -> ListenC o m a #

Monad m => Monad (ListenC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

(>>=) :: ListenC o m a -> (a -> ListenC o m b) -> ListenC o m b #

(>>) :: ListenC o m a -> ListenC o m b -> ListenC o m b #

return :: a -> ListenC o m a #

Functor m => Functor (ListenC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fmap :: (a -> b) -> ListenC o m a -> ListenC o m b #

(<$) :: a -> ListenC o m b -> ListenC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> ListenC o m a #

Monad m => Applicative (ListenC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

pure :: a -> ListenC o m a #

(<*>) :: ListenC o m (a -> b) -> ListenC o m a -> ListenC o m b #

liftA2 :: (a -> b -> c) -> ListenC o m a -> ListenC o m b -> ListenC o m c #

(*>) :: ListenC o m a -> ListenC o m b -> ListenC o m b #

(<*) :: ListenC o m a -> ListenC o m b -> ListenC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

empty :: ListenC o m a #

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

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

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

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

Defined in Control.Effect.Internal.Writer

Methods

mzero :: ListenC o m a #

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. ListenC o m a -> ListenC o m a) -> ListenC o m b) -> ListenC o m b #

uninterruptibleMask :: ((forall a. ListenC o m a -> ListenC o m a) -> ListenC o m b) -> ListenC o m b #

generalBracket :: ListenC o m a -> (a -> ExitCase b -> ListenC o m c) -> (a -> ListenC o m b) -> ListenC o m (b, c) #

(Carrier m, Monoid o, Threads (WriterT o) (Prims m)) => Carrier (ListenC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type Derivs (ListenC o m) :: [Effect] Source #

type Prims (ListenC o m) :: [Effect] Source #

type StT (ListenC o) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StT (ListenC o) a = StT (TellC o) a
type Derivs (ListenC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Derivs (ListenC o m) = Listen o ': (Tell o ': Derivs m)
type Prims (ListenC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Prims (ListenC o m) = ListenPrim o ': Prims m
type StM (ListenC o m) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StM (ListenC o m) a = StM (TellC o m) a

data ListenLazyC o m a Source #

Instances

Instances details
(Monoid o, MonadBase b m) => MonadBase b (ListenLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> ListenLazyC o m α #

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

Defined in Control.Effect.Internal.Writer

Associated Types

type StM (ListenLazyC o m) a #

Methods

liftBaseWith :: (RunInBase (ListenLazyC o m) b -> b a) -> ListenLazyC o m a #

restoreM :: StM (ListenLazyC o m) a -> ListenLazyC o m a #

Monoid o => MonadTrans (ListenLazyC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

lift :: Monad m => m a -> ListenLazyC o m a #

Monoid o => MonadTransControl (ListenLazyC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type StT (ListenLazyC o) a #

Methods

liftWith :: Monad m => (Run (ListenLazyC o) -> m a) -> ListenLazyC o m a #

restoreT :: Monad m => m (StT (ListenLazyC o) a) -> ListenLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

(>>=) :: ListenLazyC o m a -> (a -> ListenLazyC o m b) -> ListenLazyC o m b #

(>>) :: ListenLazyC o m a -> ListenLazyC o m b -> ListenLazyC o m b #

return :: a -> ListenLazyC o m a #

Functor m => Functor (ListenLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fmap :: (a -> b) -> ListenLazyC o m a -> ListenLazyC o m b #

(<$) :: a -> ListenLazyC o m b -> ListenLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> ListenLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

pure :: a -> ListenLazyC o m a #

(<*>) :: ListenLazyC o m (a -> b) -> ListenLazyC o m a -> ListenLazyC o m b #

liftA2 :: (a -> b -> c) -> ListenLazyC o m a -> ListenLazyC o m b -> ListenLazyC o m c #

(*>) :: ListenLazyC o m a -> ListenLazyC o m b -> ListenLazyC o m b #

(<*) :: ListenLazyC o m a -> ListenLazyC o m b -> ListenLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

empty :: ListenLazyC o m a #

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

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

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

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

Defined in Control.Effect.Internal.Writer

Methods

mzero :: ListenLazyC o m a #

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. ListenLazyC o m a -> ListenLazyC o m a) -> ListenLazyC o m b) -> ListenLazyC o m b #

uninterruptibleMask :: ((forall a. ListenLazyC o m a -> ListenLazyC o m a) -> ListenLazyC o m b) -> ListenLazyC o m b #

generalBracket :: ListenLazyC o m a -> (a -> ExitCase b -> ListenLazyC o m c) -> (a -> ListenLazyC o m b) -> ListenLazyC o m (b, c) #

(Monoid o, Carrier m, Threads (WriterT o) (Prims m)) => Carrier (ListenLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type Derivs (ListenLazyC o m) :: [Effect] Source #

type Prims (ListenLazyC o m) :: [Effect] Source #

type StT (ListenLazyC o) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StT (ListenLazyC o) a = StT (WriterT o) a
type Derivs (ListenLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Derivs (ListenLazyC o m) = Listen o ': (Tell o ': Derivs m)
type Prims (ListenLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Prims (ListenLazyC o m) = ListenPrim o ': Prims m
type StM (ListenLazyC o m) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StM (ListenLazyC o m) a = StM (WriterT o m) a

type ListenTVarC o = CompositionC '[IntroC '[Listen o, Tell o] '[ListenPrim o, Local (o -> STM ()), Ask (o -> STM ())], InterpretC WriterTVarH (Listen o), InterpretC WriterTVarH (Tell o), InterpretPrimC WriterTVarH (ListenPrim o), ReaderC (o -> STM ())] Source #

type ListenIntoEndoListenC o = CompositionC '[IntroC '[Listen o, Tell o] '[Listen (Endo o), Tell (Endo o)], InterpretC WriterToEndoWriterH (Listen o), InterpretC WriterToEndoWriterH (Tell o)] Source #

data WriterC o m a Source #

Instances

Instances details
MonadBase b m => MonadBase b (WriterC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> WriterC o m α #

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

Defined in Control.Effect.Internal.Writer

Associated Types

type StM (WriterC o m) a #

Methods

liftBaseWith :: (RunInBase (WriterC o m) b -> b a) -> WriterC o m a #

restoreM :: StM (WriterC o m) a -> WriterC o m a #

MonadTrans (WriterC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

lift :: Monad m => m a -> WriterC o m a #

Monoid o => MonadTransControl (WriterC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type StT (WriterC o) a #

Methods

liftWith :: Monad m => (Run (WriterC o) -> m a) -> WriterC o m a #

restoreT :: Monad m => m (StT (WriterC o) a) -> WriterC o m a #

Monad m => Monad (WriterC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

(>>=) :: WriterC o m a -> (a -> WriterC o m b) -> WriterC o m b #

(>>) :: WriterC o m a -> WriterC o m b -> WriterC o m b #

return :: a -> WriterC o m a #

Functor m => Functor (WriterC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fmap :: (a -> b) -> WriterC o m a -> WriterC o m b #

(<$) :: a -> WriterC o m b -> WriterC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> WriterC o m a #

Monad m => Applicative (WriterC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

pure :: a -> WriterC o m a #

(<*>) :: WriterC o m (a -> b) -> WriterC o m a -> WriterC o m b #

liftA2 :: (a -> b -> c) -> WriterC o m a -> WriterC o m b -> WriterC o m c #

(*>) :: WriterC o m a -> WriterC o m b -> WriterC o m b #

(<*) :: WriterC o m a -> WriterC o m b -> WriterC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

empty :: WriterC o m a #

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

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

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

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

Defined in Control.Effect.Internal.Writer

Methods

mzero :: WriterC o m a #

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. WriterC o m a -> WriterC o m a) -> WriterC o m b) -> WriterC o m b #

uninterruptibleMask :: ((forall a. WriterC o m a -> WriterC o m a) -> WriterC o m b) -> WriterC o m b #

generalBracket :: WriterC o m a -> (a -> ExitCase b -> WriterC o m c) -> (a -> WriterC o m b) -> WriterC o m (b, c) #

(Carrier m, Monoid o, Threads (WriterT o) (Prims m)) => Carrier (WriterC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type Derivs (WriterC o m) :: [Effect] Source #

type Prims (WriterC o m) :: [Effect] Source #

type StT (WriterC o) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StT (WriterC o) a = StT (TellC o) a
type Derivs (WriterC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Derivs (WriterC o m) = Pass o ': (Listen o ': (Tell o ': Derivs m))
type Prims (WriterC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Prims (WriterC o m) = WriterPrim o ': Prims m
type StM (WriterC o m) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StM (WriterC o m) a = StM (TellC o m) a

data WriterLazyC o m a Source #

Instances

Instances details
(Monoid o, MonadBase b m) => MonadBase b (WriterLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

liftBase :: b α -> WriterLazyC o m α #

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

Defined in Control.Effect.Internal.Writer

Associated Types

type StM (WriterLazyC o m) a #

Methods

liftBaseWith :: (RunInBase (WriterLazyC o m) b -> b a) -> WriterLazyC o m a #

restoreM :: StM (WriterLazyC o m) a -> WriterLazyC o m a #

Monoid o => MonadTrans (WriterLazyC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

lift :: Monad m => m a -> WriterLazyC o m a #

Monoid o => MonadTransControl (WriterLazyC o) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type StT (WriterLazyC o) a #

Methods

liftWith :: Monad m => (Run (WriterLazyC o) -> m a) -> WriterLazyC o m a #

restoreT :: Monad m => m (StT (WriterLazyC o) a) -> WriterLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

(>>=) :: WriterLazyC o m a -> (a -> WriterLazyC o m b) -> WriterLazyC o m b #

(>>) :: WriterLazyC o m a -> WriterLazyC o m b -> WriterLazyC o m b #

return :: a -> WriterLazyC o m a #

Functor m => Functor (WriterLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Methods

fmap :: (a -> b) -> WriterLazyC o m a -> WriterLazyC o m b #

(<$) :: a -> WriterLazyC o m b -> WriterLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

fail :: String -> WriterLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

pure :: a -> WriterLazyC o m a #

(<*>) :: WriterLazyC o m (a -> b) -> WriterLazyC o m a -> WriterLazyC o m b #

liftA2 :: (a -> b -> c) -> WriterLazyC o m a -> WriterLazyC o m b -> WriterLazyC o m c #

(*>) :: WriterLazyC o m a -> WriterLazyC o m b -> WriterLazyC o m b #

(<*) :: WriterLazyC o m a -> WriterLazyC o m b -> WriterLazyC o m a #

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

empty :: WriterLazyC o m a #

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

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

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

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

Defined in Control.Effect.Internal.Writer

Methods

mzero :: WriterLazyC o m a #

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

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

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

Defined in Control.Effect.Internal.Writer

Methods

mask :: ((forall a. WriterLazyC o m a -> WriterLazyC o m a) -> WriterLazyC o m b) -> WriterLazyC o m b #

uninterruptibleMask :: ((forall a. WriterLazyC o m a -> WriterLazyC o m a) -> WriterLazyC o m b) -> WriterLazyC o m b #

generalBracket :: WriterLazyC o m a -> (a -> ExitCase b -> WriterLazyC o m c) -> (a -> WriterLazyC o m b) -> WriterLazyC o m (b, c) #

(Monoid o, Carrier m, Threads (WriterT o) (Prims m)) => Carrier (WriterLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

Associated Types

type Derivs (WriterLazyC o m) :: [Effect] Source #

type Prims (WriterLazyC o m) :: [Effect] Source #

type StT (WriterLazyC o) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StT (WriterLazyC o) a = StT (WriterT o) a
type Derivs (WriterLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Derivs (WriterLazyC o m) = Pass o ': (Listen o ': (Tell o ': Derivs m))
type Prims (WriterLazyC o m) Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type Prims (WriterLazyC o m) = WriterPrim o ': Prims m
type StM (WriterLazyC o m) a Source # 
Instance details

Defined in Control.Effect.Internal.Writer

type StM (WriterLazyC o m) a = StM (WriterT o m) a

type WriterTVarC o = CompositionC '[IntroC '[Pass o, Listen o, Tell o] '[ListenPrim o, WriterPrim o, Local (o -> STM ()), Ask (o -> STM ())], InterpretC WriterTVarH (Pass o), InterpretC WriterTVarH (Listen o), InterpretC WriterTVarH (Tell o), InterpretC WriterTVarH (ListenPrim o), InterpretPrimC WriterTVarH (WriterPrim o), ReaderC (o -> STM ())] Source #

type WriterToBracketC o = CompositionC '[IntroC '[Pass o, Listen o, Tell o] '[Local (o -> STM ()), Ask (o -> STM ())], InterpretC WriterToBracketH (Pass o), InterpretC WriterToBracketH (Listen o), InterpretC WriterTVarH (Tell o), ReaderC (o -> STM ())] Source #

type WriterIntoEndoWriterC o = CompositionC '[IntroC '[Pass o, Listen o, Tell o] '[Pass (Endo o), Listen (Endo o), Tell (Endo o)], InterpretC WriterToEndoWriterH (Pass o), InterpretC WriterToEndoWriterH (Listen o), InterpretC WriterToEndoWriterH (Tell o)] Source #