Proposal: Left-Associative Semigroup Operator Alias in "Data.Semigroup"
Herbert Valerio Riedel
hvriedel at gmail.com
Mon Jun 6 11:30:10 UTC 2016
Hello!
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
https://ghc.haskell.org/trac/ghc/wiki/Proposal/LeftAssocSemigroupOp
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: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160606/d46ec0e2/attachment.sig>
More information about the ghc-devs
mailing list