[commit: ghc] master: Implement new `-fwarn-noncanonical-monoid-instances` (986ceb1)

git at git.haskell.org git at git.haskell.org
Sun Dec 6 15:38:46 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/986ceb1679b501414b996c520b08ce929a40f94c/ghc

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

commit 986ceb1679b501414b996c520b08ce929a40f94c
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Dec 6 16:08:21 2015 +0100

    Implement new `-fwarn-noncanonical-monoid-instances`
    
    This is similiar to the `-fwarn-noncanonical-monad-instances` warning
    implemented via #11128, but applies to `Semigroup`/`Monoid` instead
    and the `(<>)`/`mappend` methods (of which `mappend` is planned to move
    out of `Monoid` at some point in the future being redundant and thus
    error-prone).
    
    This warning is contained in `-Wcompat` but not in `-Wall`.
    
    This addresses #11150
    
    Reviewed By: quchen
    
    Differential Revision: https://phabricator.haskell.org/D1553


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

986ceb1679b501414b996c520b08ce929a40f94c
 compiler/main/DynFlags.hs                          |   6 +-
 compiler/rename/RnSource.hs                        | 148 +++++++++++++++------
 docs/users_guide/using-warnings.rst                |  26 +++-
 .../tests/wcompat-warnings/WCompatWarningsNotOn.hs |  12 ++
 .../tests/wcompat-warnings/WCompatWarningsOff.hs   |  12 ++
 .../tests/wcompat-warnings/WCompatWarningsOn.hs    |  12 ++
 .../wcompat-warnings/WCompatWarningsOn.stderr      |  16 ++-
 .../tests/wcompat-warnings/WCompatWarningsOnOff.hs |  12 ++
 utils/mkUserGuidePart/Options/Warnings.hs          |   8 ++
 9 files changed, 205 insertions(+), 47 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 986ceb1679b501414b996c520b08ce929a40f94c


More information about the ghc-commits mailing list