Why doesn't Control.Monad.Trans.Writer.censor allow to convert the record type?

Signature

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





All Articles