Monoid instances for mtl

Stefan Holdermans stefan at cs.uu.nl
Mon Jul 6 06:09:55 EDT 2009


Hi all,

On a number of occasions I found myself declaring simple instances like

   instance Monoid a => Monoid (State s a) where
     mzero   = return mzero
     mappend = liftM2 mappend

that make my life considerably easier. Would it be a good idea to add  
such instances to the Monad Transformer Library?

Of course, one could ask where to stop---but for me it make sense to  
always add sensible instances of the classes from base to a given  
library.

Cheers,

   Stefan


More information about the Libraries mailing list