Proposal #3339: Add (+>) as a synonym for mappend
g9ks157k at acme.softbase.org
Sat Jul 18 05:21:10 EDT 2009
Am Freitag, 17. Juli 2009 21:57 schrieb Edward Kmett:
> The main concern with generalizing (++) is that it was once generalized
> -- completely differently! -- for mplus in MonadPlus. So whether Monoid's
> mappend is the natural generalization of (++) or MonadPlus's mplus is, is
> not entirely clear. Neither one can completely subsume all of the use-cases
> 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 hack.
More information about the Libraries