[commit: ghc] master: DynFlags: Add -Wredundant-constraints to -Wall (2e49a31)

git at git.haskell.org git at git.haskell.org
Mon Feb 29 12:41:29 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2e49a31658afb4f730fcfec69edfc9e785af71f4/ghc

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

commit 2e49a31658afb4f730fcfec69edfc9e785af71f4
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Mon Feb 29 12:28:49 2016 +0100

    DynFlags: Add -Wredundant-constraints to -Wall
    
    Test Plan: It works, I promise.
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1956
    
    GHC Trac Issues: #11370


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

2e49a31658afb4f730fcfec69edfc9e785af71f4
 compiler/main/DynFlags.hs                              | 3 ++-
 testsuite/tests/typecheck/should_compile/T10632.stderr | 2 +-
 testsuite/tests/typecheck/should_compile/T9939.stderr  | 8 ++++----
 testsuite/tests/warnings/should_compile/PluralS.stderr | 4 ++--
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 8f9fbbb..ce51d3e 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3887,7 +3887,8 @@ minusWallOpts
         Opt_WarnUnusedDoBind,
         Opt_WarnTrustworthySafe,
         Opt_WarnUntickedPromotedConstructors,
-        Opt_WarnMissingPatternSynonymSignatures
+        Opt_WarnMissingPatternSynonymSignatures,
+        Opt_WarnRedundantConstraints
       ]
 
 -- | Things you get with -Weverything, i.e. *all* known warnings flags
diff --git a/testsuite/tests/typecheck/should_compile/T10632.stderr b/testsuite/tests/typecheck/should_compile/T10632.stderr
index 211972d..c3d112f 100644
--- a/testsuite/tests/typecheck/should_compile/T10632.stderr
+++ b/testsuite/tests/typecheck/should_compile/T10632.stderr
@@ -1,5 +1,5 @@
 
-T10632.hs:3:1: warning: [-Wredundant-constraints]
+T10632.hs:3:1: warning: [-Wredundant-constraints (in -Wall)]
     • Redundant constraint: ?file1::String
     • In the type signature for:
            f :: (?file1::String) => IO ()
diff --git a/testsuite/tests/typecheck/should_compile/T9939.stderr b/testsuite/tests/typecheck/should_compile/T9939.stderr
index a10066b..d10c510 100644
--- a/testsuite/tests/typecheck/should_compile/T9939.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9939.stderr
@@ -1,20 +1,20 @@
 
-T9939.hs:5:1: warning: [-Wredundant-constraints]
+T9939.hs:5:1: warning: [-Wredundant-constraints (in -Wall)]
     • Redundant constraint: Eq a
     • In the type signature for:
            f1 :: (Eq a, Ord a) => a -> a -> Bool
 
-T9939.hs:9:1: warning: [-Wredundant-constraints]
+T9939.hs:9:1: warning: [-Wredundant-constraints (in -Wall)]
     • Redundant constraint: Eq a
     • In the type signature for:
            f2 :: (Eq a, Ord a) => a -> a -> Bool
 
-T9939.hs:13:1: warning: [-Wredundant-constraints]
+T9939.hs:13:1: warning: [-Wredundant-constraints (in -Wall)]
     • Redundant constraint: Eq b
     • In the type signature for:
            f3 :: (Eq a, a ~ b, Eq b) => a -> b -> Bool
 
-T9939.hs:20:1: warning: [-Wredundant-constraints]
+T9939.hs:20:1: warning: [-Wredundant-constraints (in -Wall)]
     • Redundant constraint: Eq a
     • In the type signature for:
            f4 :: (Eq a, Eq b) => a -> b -> Equal a b -> Bool
diff --git a/testsuite/tests/warnings/should_compile/PluralS.stderr b/testsuite/tests/warnings/should_compile/PluralS.stderr
index 9289a0b..4cffc15 100644
--- a/testsuite/tests/warnings/should_compile/PluralS.stderr
+++ b/testsuite/tests/warnings/should_compile/PluralS.stderr
@@ -15,12 +15,12 @@ PluralS.hs:17:29: warning: [-Wtype-defaults (in -Wall)]
       In an equation for ‘defaultingNumAndShow’:
           defaultingNumAndShow = show 123
 
-PluralS.hs:23:1: warning: [-Wredundant-constraints]
+PluralS.hs:23:1: warning: [-Wredundant-constraints (in -Wall)]
     • Redundant constraint: Num a
     • In the type signature for:
            redundantNum :: (Num a, Num a) => a
 
-PluralS.hs:26:1: warning: [-Wredundant-constraints]
+PluralS.hs:26:1: warning: [-Wredundant-constraints (in -Wall)]
     • Redundant constraints: (Show a, Num a, Eq a, Eq a)
     • In the type signature for:
            redundantMultiple :: (Num a, Show a, Num a, Eq a, Eq a) => a



More information about the ghc-commits mailing list