> 1. GHC 7.12 will include Semigroup and NonEmpty in base. All Monoid
instances, and anything else which forms a Semigroup, will have a Semigroupinstance. GHC will issue a warning when it encounters an instance of Monoidwhich is not an instance of Semigroup.
There is going to be some push-back on this proposal from those that point out the lack of mempty makes Semigroup less rigorous that a Monoid. That concept can create a debate around what is "anything else which forms a semigroup".
I would try to amend the proposal to something much more specific.
Here is how I have used Semigroup
1) a structure that is already a Monoid
2) a structure that is a non-empty form of a Monoid
3) a structure where mempty is not constant but a function of the element you would concatenate it to
An example of 3) is concatenating bounding boxes. A zeroed box is certainly an empty box, but it will create a larger box when concatenated with an existing box.The identity concatenation of the current bounding box is always the current bounding box.
What other structures do you use Semigroup for?
Are there structures in base where there would be a debate about adding an instance?
Can we come up with rules for when a Semigroup instance should be added to base?