Why doesn't Control.Monad.Trans.Writer.censor allow to convert the record type?
censor :: Monad m => (w -> w) -> WriterT w m a -> WriterT w m a
But we could easily have a strictly more general
censor :: Functor m => (w -> w') -> WriterT w m a -> WriterT w' m a censor = mapWriterT . fmap . second
Of course it won't work with a chunkmtl
, but is this a good reason? Or could it be performance related?
+3
source to share
No one has answered this question yet
Check out similar questions: