Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Writer o m a where
- tell :: forall o. forall r. Member (Writer o) r => o -> Semantic r ()
- listen :: forall o a. forall r. Member (Writer o) r => Semantic r a -> Semantic r (o, a)
- censor :: forall o a. forall r. Member (Writer o) r => (o -> o) -> Semantic r a -> Semantic r a
- runOutputAsWriter :: Semantic (Output o ': r) a -> Semantic (Writer o ': r) a
- runWriter :: (Monoid o, Typeable o) => Semantic (Writer o ': r) a -> Semantic r (o, a)
Effect
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) | |
Censor :: (o -> o) -> m a -> Writer o m a |
Instances
type DefiningModule Writer Source # | |
Defined in Polysemy.Writer |
Actions
censor :: forall o a. forall r. Member (Writer o) r => (o -> o) -> Semantic r a -> Semantic r a Source #