
6 Jan
2011
6 Jan
'11
6:16 a.m.
On Wed, Jan 05, 2011 at 10:47:17PM -0500, Sterling Clover wrote:
Ticket: http://hackage.haskell.org/trac/ghc/ticket/4880
This proposal adds missing instances for the two newtype wrappers for Maybe in Data.Monoid. A patch is attached to the ticket. Both the motivation and implementation are straightforward.
I can't think of a use for them, but on the principle that if there's a canonical instance it should be supplied, why not? Two things I'd change: * move the Functor and Monad instances to Data.Monoid to save them from being orphans. * add MonadPlus (in Data.Monoid) and Alternative instances that behave the same as the Monoid instances.