lexi-lambda / freer-simple

A friendly effect system for Haskell
https://hackage.haskell.org/package/freer-simple
BSD 3-Clause "New" or "Revised" License
228 stars 20 forks source link

Is it possible to define 'mapWriter' for the Writer effect? #33

Closed kozross closed 3 years ago

kozross commented 3 years ago

I have an effect stack with a Writer () in it someplace. I want to keep the stack the same, but instead of having Writer () in that place, I want Writer w for some suitable w. If I was using MTL, I would use mapWriter to achieve this, but there seems to be no analog for it here.

Is this possible to define somehow, and if so, how would I do it?

kozross commented 3 years ago

Just realized, upon further thought, that what I want isn't possible in general. Closing.