Proposal #3339: Add (+>) as a synonym for mappend

Edward Kmett ekmett at gmail.com
Sat Jul 18 09:23:53 EDT 2009


On Sat, Jul 18, 2009 at 6:14 AM, Conor McBride
<conor at strictlypositive.org>wrote:

> Until that joyous day, I'd like to hope we might consider ensuring
> that MonadPlus m, Alternative m, and Monoid (m a) functionalities
> do at least coincide.
>
> I'm thinking in particular of Maybe, which behaves splendidly as
> an implementation of an exception monad, until you start using
> foldMap as a control operator.
>

Yeah, the Monoid instance for Maybe is somewhat unfortunate.

I can see where they were going as Maybe does provide the natural extension
of a semigroup into a monoid by adding a unit element, but it doesn't have a
Semigroup class to build on, and so has to require Monoid and in the end you
get a definition that conflicts with the MonadPlus/Alternative instances for
Maybe, and only really helps if you have broken Monoid instances around that
are secretly just Semigroups.

-Edward Kmett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20090718/a7995355/attachment.html


More information about the Libraries mailing list