Proposal #3339: Add (+>) as a synonym for mappend
conor at strictlypositive.org
Sat Jul 18 06:14:12 EDT 2009
On 18 Jul 2009, at 10:21, Wolfgang Jeltsch wrote:
> Am Freitag, 17. Juli 2009 21:57 schrieb Edward Kmett:
>> The main concern with generalizing (++) is that it was once
>> -- completely differently! -- for mplus in MonadPlus. So whether
>> mappend is the natural generalization of (++) or MonadPlus's mplus
>> is, is
>> not entirely clear. Neither one can completely subsume all of the
>> of the other.
> I hope that in the long run, we will be able to drop Alternative and
> MonadPlus. This will be possible once we allow universal
> quantification in
> contexts. Instead of writing (MonadPlus m), we can write (Monad m,
> forall a.
> Monoid (m a)) then. This makes it rather clear that Monoid (mappend)
> would be
> the better generalization of (++). MonadPlus (mplus) is a bit of a
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.
More information about the Libraries