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

Bas van Dijk v.dijk.bas at
Mon Nov 7 18:51:14 CET 2011

On 7 November 2011 14:55, Brandon Allbery <allbery.b at> wrote:
> On Mon, Nov 7, 2011 at 05:14, Simon Peyton-Jones <simonpj at>
> wrote:
>> If there's a bug in GHC, or a feature request, can someone make a ticket
>> with a standalone reproducible test case, please? I have not been following
>> the twists and turns of this discussion.
> It's not so much a bug as it is code that is less than clear; while in this
> case cleaning it up is a good idea for other reasons, I suspect if we used
> that as a general metric most of GHC would have to be rewritten :)
> --
> brandon s allbery                                      allbery.b at
> wandering unix systems administrator (available)     (412) 475-9364 vm/sms
> _______________________________________________
> Libraries mailing list
> Libraries at

Once we have (<>) = mappend we could make two nice refactorings in GHC
similarly to what I did in these unapplied patches:

Wed Dec  8 15:54:57 CET 2010  Bas van Dijk <v.dijk.bas at>
  * Make SDoc an abstract newtype and add a Monoid instance for it
  The (<>) combinator of SDocs is removed and replaced by the
  more general (<>) = mappend combinator from Util.

Wed Dec  8 16:39:06 CET 2010  Bas van Dijk <v.dijk.bas at>
  * Add a Monoid instance for AGraph and remove the <*> splice operator
  Instead of <*>, the (<>) = mappend operator is now used to splice AGraphs.
  This change is needed because <*> clashes with the Applicative apply
operator <*>,
  which is probably going to be exported from the Prelude
  when the new Monad hierarchy is going through.



More information about the Libraries mailing list