Because there are many monads for which you do not want this construction!
>>>>> Edward Kmett <ekmett@gmail.com> writes:Why not then this? That is, once AMP is out...
> The third construction is the 'universal' lifting that works for every
> Applicative, which would look like:
> instance (Monad m, Monoid a) => Monoid (ContT r m a) where
> mempty = return mempty
> mappend = liftM2 mappend
instance (Applicative m, Monoid a) => Monoid (m a) where
mempty = pure mempty
mappend = liftA2 mappend
--
John Wiegley
FP Complete Haskell tools, training and consulting
http://fpcomplete.com johnw on #haskell/irc.freenode.net
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries