Make Semigroup a superclass of Monoid (re #14191)
authorHerbert Valerio Riedel <hvr@gnu.org>
Tue, 5 Sep 2017 05:29:36 +0000 (07:29 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Thu, 7 Sep 2017 21:43:53 +0000 (23:43 +0200)
commit8ae263ceb3566a7c82336400b09cb8f381217405
tree535775c4f739cd23bd443557f2d8f8b939cf711e
parent055d73c6576bed2affaf96ef6a6b89aeb2cd2e9f
Make Semigroup a superclass of Monoid (re #14191)

Unfortunately, this requires introducing a couple of .hs-boot files to
break up import cycles (mostly to provide class & typenames in order to
be able to write type signatures).

This does not yet re-export `(<>)` from Prelude (while the class-name
`Semigroup` is reexported); that will happen in a future commit.

Test Plan: local ./validate passed

Reviewers: ekmett, austin, bgamari, erikd, RyanGlScott

Reviewed By: ekmett, RyanGlScott

GHC Trac Issues: #14191

Differential Revision: https://phabricator.haskell.org/D3927
44 files changed:
compiler/prelude/PrelNames.hs
libraries/base/Data/Either.hs
libraries/base/Data/Functor/Const.hs
libraries/base/Data/Functor/Identity.hs
libraries/base/Data/Functor/Utils.hs
libraries/base/Data/Monoid.hs
libraries/base/Data/Ord.hs
libraries/base/Data/Proxy.hs
libraries/base/Data/Semigroup.hs
libraries/base/Data/Semigroup/Internal.hs [new file with mode: 0644]
libraries/base/Data/Semigroup/Internal.hs-boot [new file with mode: 0644]
libraries/base/Data/Void.hs
libraries/base/GHC/Base.hs
libraries/base/GHC/Base.hs-boot [new file with mode: 0644]
libraries/base/GHC/Event/Internal.hs
libraries/base/GHC/Real.hs-boot [new file with mode: 0644]
libraries/base/GHC/ST.hs
libraries/base/Prelude.hs
libraries/base/base.cabal
libraries/base/changelog.md
testsuite/tests/ghci/scripts/T10963.script
testsuite/tests/ghci/scripts/T4175.stdout
testsuite/tests/ghci/scripts/T7627.stdout
testsuite/tests/ghci/scripts/T8535.stdout
testsuite/tests/ghci/scripts/T9881.stdout
testsuite/tests/ghci/scripts/ghci011.stdout
testsuite/tests/ghci/scripts/ghci020.stdout
testsuite/tests/ghci/should_run/T10145.stdout
testsuite/tests/perf/compiler/all.T
testsuite/tests/perf/should_run/T4978.hs
testsuite/tests/polykinds/MonoidsFD.hs
testsuite/tests/polykinds/MonoidsTF.hs
testsuite/tests/polykinds/T7332.hs
testsuite/tests/semigroup/Makefile [deleted file]
testsuite/tests/semigroup/SemigroupWarnings.hs [deleted file]
testsuite/tests/semigroup/SemigroupWarnings.stderr [deleted file]
testsuite/tests/semigroup/all.T [deleted file]
testsuite/tests/simplCore/should_run/T13429a.hs
testsuite/tests/typecheck/should_run/T6117.hs
testsuite/tests/wcompat-warnings/WCompatWarningsNotOn.hs
testsuite/tests/wcompat-warnings/WCompatWarningsOff.hs
testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs