Cont as Monoid

Stefan O'Rear stefanor at cox.net
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?

http://haskell.org/haskellwiki/Library_submissions

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

(Why is there no liftM0 ?)

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/libraries/attachments/20070908/f70120c8/attachment.bin


More information about the Libraries mailing list