Generalise constraint on `instance Monoid (Maybe a)` to Semigroup
ClosedPublic

Authored by hvr on Sep 15 2017, 9:45 AM.

Details

Summary

This now becomes possible due to the introduction of the
Semigroup=>Monoid superclass relation.

Test Plan

Harbormaster

hvr created this revision.Sep 15 2017, 9:45 AM
RyanGlScott edited edge metadata.Sep 15 2017, 9:51 AM

Make sure to update the changelog!

libraries/base/GHC/Base.hs
416–419

I find this "prior to base-4.9.0" qualification to be more confusing than anything. Just leave that sentence off.

ekmett accepted this revision.Sep 15 2017, 1:21 PM

Looks very good to me.

This revision is now accepted and ready to land.Sep 15 2017, 1:21 PM
bgamari requested changes to this revision.Sep 15 2017, 1:36 PM

Changelog entry needed.

This revision now requires changes to proceed.Sep 15 2017, 1:36 PM
hvr updated this revision to Diff 13916.Sep 15 2017, 3:37 PM
hvr edited edge metadata.

Address concerns

RyanGlScott added inline comments.Sep 15 2017, 5:48 PM
libraries/base/GHC/Base.hs
416–419

To be clear, I think you should leave off the entirety of the sentence "Since there used to be no 'Semigroup' typeclass providing just '<>' we use 'Monoid' instead." It's needlessly dwelling on the past—especially since the subsequent paragraph makes sufficient note of the fact that its context changed recently.

hvr updated this revision to Diff 13921.Sep 16 2017, 1:53 AM
  • Remove past-dwelling-sentence for good
  • Adjust testsuite output for T4175
hvr marked 2 inline comments as done.Sep 16 2017, 1:55 AM
RyanGlScott accepted this revision.Sep 16 2017, 1:16 PM
bgamari accepted this revision.Sep 18 2017, 9:43 PM

Looks good to me.

This revision is now accepted and ready to land.Sep 18 2017, 9:43 PM
This revision was automatically updated to reflect the committed changes.