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

Yitzchak Gale gale at
Mon Aug 15 17:09:13 CEST 2011

Sebastian Fischer wrote:
> The proposal is not to replace 'mappend' in the Monoid class with <>. The
> proposal is to add the top-level definition
>     (<>) = mappend
> to Data.Monoid.

Thanks Sebastian, you're right, I misread that. I wouldn't have
made nearly as much noise then. It's still bad to have two
definitions of <> that appear to be the same but are in reality
two different functions. But in the short term, that won't cause
me nearly as much damage.

In the long term, it is perhaps worse. It means that now even
superclass defaulting won't completely solve the problem -
you can silently get the wrong function without noticing.
That would be a very difficult bug to find.

Note that this is worse than, for example, libraries that shadow
Prelude functions. There, if you don't use the right qualified/hiding
incantation, you'll generally get a compile error.

Anyway, I apologize for grossly overreacting. If anyone needs
me in the near future, please look inside the hole I am
currently digging for myself.


More information about the Libraries mailing list