freer-effects-0.3.0.1: Implementation of effect system for Haskell.

Copyright(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.
LicenseBSD3
Maintainerixcom-core@ixperta.com
Stabilityexperimental
PortabilityGHC specific language extensions.
Safe HaskellNone
LanguageHaskell2010

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 a where Source #

Writer effects - send outputs to an effect environment.

Constructors

Writer :: w -> Writer w () 

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

Send a change to the attached environment.

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

Simple handler for Writer effects.