freer-simple-1.2.1.2: A friendly effect system for Haskell.
Copyright (c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis King
License BSD3
Maintainer Alexis King <lexi.lambda@gmail.com>
Stability experimental
Portability GHC specific language extensions.
Safe Haskell None
Language Haskell2010

Control.Monad.Freer.Writer

Description

Writer effects, for writing/appending values (line count, list of messages, etc.) to an output. Current value of Writer effect output is not accessible to the computation.

Using http://okmij.org/ftp/Haskell/extensible/Eff1.hs as a starting point.

Synopsis

Documentation

data Writer w r where Source #

Writer effects - send outputs to an effect environment.

Constructors

Tell :: w -> Writer w ()

tell :: forall w effs. Member ( Writer w) effs => w -> Eff effs () Source #

Send a change to the attached environment.

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

Simple handler for Writer effects.