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

Duncan Coutts duncan.coutts at
Fri Sep 18 07:18:54 EDT 2009

On Thu, 2009-09-17 at 14:37 +0100, Ross Paterson wrote:

> This proposal seems to have got stuck.  Everyone wants an infix operator,
> but we can't agree what it should be.
> I prefer using a new operator instead of generalizing ++ (or +, *, &&
> or ||), because I think that a monoid operation is so abstract that it
> needs a name that doesn't suggest one of the special cases.  (I like <>)

Nice. For some reason I much prefer a symbol like <> to one like +>.

I want to say that it's because it looks symmetric, though of course
mappend, ++ are associative not symmetric, so it's not a very good
argument. But I still like it! :-)

So I guess we should adjust the proposal, or make a new one.
      * Suggest the name <> (which so far seems to have popular support)
      * Get rid of the suggestion for a reverse mappend operator
      * As Krasimir says, include in the proposal that we would deal
        with the existing libraries that use a local <> for their
        mappend operator (at least Text.PrettyPrint).

One thing we've not mentioned much is operator precedence. Existing
  infixr 5 Data.Sequence.><
  infixl 6 Text.PrettyPrint.<>
Existing proposal about (+>)
  infixl 4 +>


More information about the Libraries mailing list