Cont as Monoid

Stefan O'Rear stefanor at
Sat Sep 8 20:43:33 EDT 2007

On Sat, Sep 08, 2007 at 05:26:09PM -0700, Conal Elliott wrote:
> I'd like to see the following addition to Control.Monad.Cont in mtl:
> instance Monoid r => Monoid (Cont r a) where
>     mempty         = Cont mempty
>     m `mappend` m' = Cont (runCont m `mappend` runCont m')
> What's the process for suggesting, discussing, and making such changes?

(My 2 cents: Why not mempty = return mempty; mappend = liftM2 mappend ?
Instances are best if unambiguous.)

(Why is there no liftM0 ?)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the Libraries mailing list