[Haskell-cafe] Monoid wants a (++) equivalent

Henning Thielemann lemming at henning-thielemann.de
Sun Jul 5 16:41:16 EDT 2009


On Tue, 30 Jun 2009, Bryan O'Sullivan wrote:

> I've thought for a while that it would be very nice indeed if the Monoid class had a more
> concise operator for infix appending than "a `mappend` b". I wonder if other people are of a
> similar opinion, and if so, whether this is worth submitting a libraries@ proposal over.

We have the package version policy which relies on explicit or qualified 
imports, such that adding a function like (++) to Data.Monoid cannot harm 
any package that follow that policy. Thus I vote for not introducing a new 
operator, in order to keep the set of infix operators to memorize small, 
but use (++) for the generalized (List.++) aka mappend. The user would 
however need to hide (++) from Prelude.


More information about the Haskell-Cafe mailing list