Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Writer o m a where
- pass :: forall o r a. MemberWithError (Writer o) r => Sem r (o -> o, a) -> Sem r a
- listen :: forall o r a. MemberWithError (Writer o) r => Sem r a -> Sem r (o, a)
- tell :: forall o r. MemberWithError (Writer o) r => o -> Sem r ()
- writerToEndoWriter :: (Monoid o, Member (Writer (Endo o)) r) => Sem (Writer o ': r) a -> Sem r a
- runWriterSTMAction :: forall o r a. (Member (Final IO) r, Monoid o) => (o -> STM ()) -> Sem (Writer o ': r) a -> Sem r a
- interpretViaLazyWriter :: forall o e r a. Monoid o => (forall m x. Monad m => Weaving e (WriterT o m) x -> WriterT o m x) -> Sem (e ': r) a -> Sem r (o, a)
Documentation
data Writer o m a where Source #
An effect capable of emitting and intercepting messages.
Tell :: o -> Writer o m () | |
Listen :: forall o m a. m a -> Writer o m (o, a) | |
Pass :: m (o -> o, a) -> Writer o m a |
Instances
type DefiningModule Writer Source # | |
Defined in Polysemy.Internal.Writer |
writerToEndoWriter :: (Monoid o, Member (Writer (Endo o)) r) => Sem (Writer o ': r) a -> Sem r a Source #