[commit: ghc] master: Implement warnings for Semigroups as parent of Monoid (290def7)

git at git.haskell.org git at git.haskell.org
Sun Nov 29 22:26:15 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/290def72f54db7969258b4541aaefc87b54ce448/ghc

>---------------------------------------------------------------

commit 290def72f54db7969258b4541aaefc87b54ce448
Author: David Luposchainsky <dluposchainsky at gmail.com>
Date:   Sun Nov 29 22:59:57 2015 +0100

    Implement warnings for Semigroups as parent of Monoid
    
    This patch is similar to the AMP patch (#8004), which offered two
    functions:
    
      1. Warn when an instance of a class has been given, but the type does
         not have a certain superclass instance
      2. Warn when top-level definitions conflict with future Prelude names
    
    These warnings are issued as part of the new `-Wcompat` warning group.
    
    Reviewers: hvr, ekmett, austin, bgamari
    
    Reviewed By: hvr, ekmett, bgamari
    
    Subscribers: ekmett, thomie
    
    Differential Revision: https://phabricator.haskell.org/D1539
    
    GHC Trac Issues: #11139


>---------------------------------------------------------------

290def72f54db7969258b4541aaefc87b54ce448
 compiler/hsSyn/HsTypes.hs                          |  10 ++
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs            |  10 ++
 compiler/main/DynFlags.hs                          |   5 +-
 compiler/main/Packages.hs                          |  16 ++
 compiler/prelude/PrelNames.hs                      |  29 +++-
 compiler/typecheck/TcErrors.hs                     |   9 +
 compiler/typecheck/TcRnDriver.hs                   | 193 ++++++++++++++++++++-
 compiler/utils/OrdList.hs                          |   9 +
 compiler/utils/UniqFM.hs                           |   9 +
 docs/users_guide/7.12.1-notes.rst                  |   6 +
 docs/users_guide/using-warnings.rst                |  18 +-
 testsuite/tests/{ado => semigroup}/Makefile        |   0
 testsuite/tests/semigroup/SemigroupWarnings.hs     |  34 ++++
 testsuite/tests/semigroup/SemigroupWarnings.stderr |   8 +
 testsuite/tests/semigroup/all.T                    |   1 +
 .../should_fail/CustomTypeErrors02.stderr          |  12 +-
 .../tests/wcompat-warnings/WCompatWarningsNotOn.hs |   2 +
 .../tests/wcompat-warnings/WCompatWarningsOff.hs   |   2 +
 .../tests/wcompat-warnings/WCompatWarningsOn.hs    |   2 +
 .../wcompat-warnings/WCompatWarningsOn.stderr      |  42 +++--
 .../tests/wcompat-warnings/WCompatWarningsOnOff.hs |   2 +
 utils/mkUserGuidePart/Options/Warnings.hs          |  11 +-
 22 files changed, 399 insertions(+), 31 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 290def72f54db7969258b4541aaefc87b54ce448


More information about the ghc-commits mailing list