WriterIMO itself is quite useless. Yes, "entering into pure computation" makes sense, but for a simple clean computation you will have to rewrite everything in order to use monadic bindings. The result will not be much better than if you had just rewritten it to manually concatenate the log information.
Which is really useful, however, is to add a slot WriterTto the monad stack that you have, so that you get the option of logging with virtually no change in definitions. This is what is done in the "big powerful" monads, like the ones used in Yesod, etc., But WriterTyou can also apply to any simple special monad that you use.
source
share