effectful-0.0.0.0: A simple, yet powerful extensible effects library.
Safe HaskellNone
LanguageHaskell2010

Effectful.Writer

Description

The Writer as an effect.

Synopsis

Documentation

data Writer w Source #

Provide access to a write only value of type w.

Instances

Instances details
Semigroup w => Semigroup (Writer w) Source # 
Instance details

Defined in Effectful.Writer

Methods

(<>) :: Writer w -> Writer w -> Writer w #

sconcat :: NonEmpty (Writer w) -> Writer w #

stimes :: Integral b => b -> Writer w -> Writer w #

Monoid w => Monoid (Writer w) Source # 
Instance details

Defined in Effectful.Writer

Methods

mempty :: Writer w #

mappend :: Writer w -> Writer w -> Writer w #

mconcat :: [Writer w] -> Writer w #

runWriter :: Monoid w => Eff (Writer w ': es) a -> Eff es (a, w) Source #

execWriter :: Monoid w => Eff (Writer w ': es) a -> Eff es w Source #

writer :: (Writer w :> es, Monoid w) => (a, w) -> Eff es a Source #

tell :: (Writer w :> es, Monoid w) => w -> Eff es () Source #

listen :: (Writer w :> es, Monoid w) => Eff es a -> Eff es (a, w) Source #

listens :: (Writer w :> es, Monoid w) => (w -> b) -> Eff es a -> Eff es (a, b) Source #