[Haskell-beginners] error logging

Stephen Tetley stephen.tetley at gmail.com
Tue Dec 20 08:55:36 CET 2011


Hi Dennis

If you want logging you probably want a Writer monad. Either / error
monads only support single message on failure. For logging you have to
pass an accumulator throughout the computation so it can store
messages - this is what Writer does.

If you want logging and error you probably want a combined Error and
Writer monad.



More information about the Beginners mailing list