polysemy-0.1.1.0: Higher-order, low-boilerplate, zero-cost free monads.

Safe HaskellNone
LanguageHaskell2010

Polysemy.Output

Contents

Synopsis

Effect

data Output o m a where Source #

An effect capable of sending messages. Useful for streaming output and for logging.

Constructors

Output :: o -> Output o m () 
Instances
type DefiningModule (Output :: Type -> k -> Type -> Type) Source # 
Instance details

Defined in Polysemy.Output

type DefiningModule (Output :: Type -> k -> Type -> Type) = "Polysemy.Output"

Actions

output :: forall o. forall r. Member (Output o) r => o -> Semantic r () Source #

Interpretations

runFoldMapOutput :: forall o m r a. (Typeable m, Monoid m) => (o -> m) -> Semantic (Output o ': r) a -> Semantic r (m, a) Source #

Run an Output effect by transforming it into a monoid.

runIgnoringOutput :: Semantic (Output o ': r) a -> Semantic r a Source #

Run an Ouput effect by ignoring it.