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

Ian Lynagh igloo at earth.li
Mon Nov 7 02:33:44 CET 2011


On Mon, Nov 07, 2011 at 01:13:23AM +0000, Duncan Coutts wrote:
> 
> So maybe we should just conclude that pretty printing should be left
> associative, building from the left.

To clarify, Duncan and I are now thinking that as pretty builds
left-to-right strings, perhaps it is natural that the operators in

    a <+> b <> c <+> d <> e <+> ...

should be left-infix, as it is natural to read this as "a then b, then
c, ...".

[Hmm, I don't know if that was actually any clearer, but a second
phrasing can't hurt]

> Should we reconsider Data.Monoid.<> if we can't make it work with the
> pretty package?

And if we do decide that pretty should have an infixl operator and
Monoid an infixr operator, then I think there will be fewer headaches if
they don't both use the same name.


Thanks
Ian




More information about the Libraries mailing list