Proposal: Left-Associative Semigroup Operator Alias in "Data.Semigroup"

Herbert Valerio Riedel hvriedel at
Mon Jun 6 11:30:10 UTC 2016


In short, the right-associative fixity of (Data.{Monoid,Semigroup}.<>)
subtly conflicts with definitions of (<>) in pretty printing APIs, for
which the left-associative variant is sometimes desirable. This subtle
overloading of (<>) is error-prone, as one has to remember which version
of (<>) is currently in scope in order to be able to reason about
non-trivial expressions involving this operator.

This proposal is an attempt to resolve this unfortunate and confusing
situation by completing the `Semigroup`/`Monoid` vocabulary with a
standard left-associative alias. Please see

for more details.

Discussion period: 4 weeks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list