freer-simple-1.2.1.1: Implementation of a friendly effect system for Haskell.

Copyright(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.; 2017 Alexis King
LicenseBSD3
MaintainerAlexis King <lexi.lambda@gmail.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 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.