When Writer was first created, I thought it would be neat to let the Writer take care of lifting raw values into the underlying Monoid. This created many problems with this Datatype:
Invalid values for the Monoid would throw deep in the Writer and out of context from where the value was "lifted". Makes for a nasty stack trace at best, and at worst you share way to much information between the type and your specific domain.
Lose all power of the extra strength of the Monoid. So if an Array is used, you can never use the empty as there is no way other than and empty array to have a void-ish value.
Was just reading this, I've yet to use Writer so this will obviously add to my confusion but I'm not sure what the update is that needs to be made. Could we add a Repl that shows the issue?
Mistakes were Made
When
Writer
was first created, I thought it would be neat to let theWriter
take care of lifting raw values into the underlyingMonoid
. This created many problems with this Datatype:Monoid
would throw deep in theWriter
and out of context from where the value was "lifted". Makes for a nasty stack trace at best, and at worst you share way to much information between the type and your specific domain.Monoid
. So if anArray
is used, you can never use the empty as there is no way other than and empty array to have avoid
-ish value.This will be a breaking change.