[commit: ghc] ghc-8.0: Remove redundant-constraints from -Wall (#10635) (4967265)
git at git.haskell.org
git at git.haskell.org
Wed Aug 31 23:24:21 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/49672659113371c3bee691e6d913df8e6f60a1d8/ghc
>---------------------------------------------------------------
commit 49672659113371c3bee691e6d913df8e6f60a1d8
Author: Adam C. Foltzer <acfoltzer at galois.com>
Date: Wed Aug 31 16:02:53 2016 -0400
Remove redundant-constraints from -Wall (#10635)
Removes -Wredundant-constraints from -Wall, as per the
discussion in #10635.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2498
GHC Trac Issues: #10635
(cherry picked from commit e9b0bf4ed52114852dbaf6af556514610a895f88)
>---------------------------------------------------------------
49672659113371c3bee691e6d913df8e6f60a1d8
compiler/main/DynFlags.hs | 3 +--
testsuite/tests/typecheck/should_compile/T10632.hs | 1 +
testsuite/tests/typecheck/should_compile/T10632.stderr | 2 +-
testsuite/tests/typecheck/should_compile/{T9939.hs => T10635.hs} | 1 -
testsuite/tests/typecheck/should_compile/T9939.hs | 1 +
testsuite/tests/typecheck/should_compile/T9939.stderr | 8 ++++----
testsuite/tests/typecheck/should_compile/all.T | 1 +
testsuite/tests/warnings/should_compile/PluralS.stderr | 4 ++--
8 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 655d72a..93c0ee8 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3904,8 +3904,7 @@ minusWallOpts
Opt_WarnUnusedDoBind,
Opt_WarnTrustworthySafe,
Opt_WarnUntickedPromotedConstructors,
- Opt_WarnMissingPatternSynonymSignatures,
- Opt_WarnRedundantConstraints
+ Opt_WarnMissingPatternSynonymSignatures
]
-- | Things you get with -Weverything, i.e. *all* known warnings flags
diff --git a/testsuite/tests/typecheck/should_compile/T10632.hs b/testsuite/tests/typecheck/should_compile/T10632.hs
index 5c1a177..03478fc 100644
--- a/testsuite/tests/typecheck/should_compile/T10632.hs
+++ b/testsuite/tests/typecheck/should_compile/T10632.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE ImplicitParams #-}
+{-# OPTIONS_GHC -Wredundant-constraints #-}
f :: (?file1 :: String) => IO ()
f = putStrLn $ "f2: "
diff --git a/testsuite/tests/typecheck/should_compile/T10632.stderr b/testsuite/tests/typecheck/should_compile/T10632.stderr
index c3d112f..1733f0a 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 (in -Wall)]
+T10632.hs:4:1: warning: [-Wredundant-constraints]
• Redundant constraint: ?file1::String
• In the type signature for:
f :: (?file1::String) => IO ()
diff --git a/testsuite/tests/typecheck/should_compile/T9939.hs b/testsuite/tests/typecheck/should_compile/T10635.hs
similarity index 99%
copy from testsuite/tests/typecheck/should_compile/T9939.hs
copy to testsuite/tests/typecheck/should_compile/T10635.hs
index 4ae370b..1382466 100644
--- a/testsuite/tests/typecheck/should_compile/T9939.hs
+++ b/testsuite/tests/typecheck/should_compile/T10635.hs
@@ -20,4 +20,3 @@ data Equal a b where
f4 :: (Eq a, Eq b) => a -> b -> Equal a b -> Bool
-- Eq b redundant
f4 x y EQUAL = y==y
-
diff --git a/testsuite/tests/typecheck/should_compile/T9939.hs b/testsuite/tests/typecheck/should_compile/T9939.hs
index 4ae370b..3ceab51 100644
--- a/testsuite/tests/typecheck/should_compile/T9939.hs
+++ b/testsuite/tests/typecheck/should_compile/T9939.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE GADTs #-}
+{-# OPTIONS_GHC -Wredundant-constraints #-}
module T9939 where
diff --git a/testsuite/tests/typecheck/should_compile/T9939.stderr b/testsuite/tests/typecheck/should_compile/T9939.stderr
index d10c510..c486679 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 (in -Wall)]
+T9939.hs:6:1: warning: [-Wredundant-constraints]
• Redundant constraint: Eq a
• In the type signature for:
f1 :: (Eq a, Ord a) => a -> a -> Bool
-T9939.hs:9:1: warning: [-Wredundant-constraints (in -Wall)]
+T9939.hs:10:1: warning: [-Wredundant-constraints]
• Redundant constraint: Eq a
• In the type signature for:
f2 :: (Eq a, Ord a) => a -> a -> Bool
-T9939.hs:13:1: warning: [-Wredundant-constraints (in -Wall)]
+T9939.hs:14:1: warning: [-Wredundant-constraints]
• 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 (in -Wall)]
+T9939.hs:21:1: warning: [-Wredundant-constraints]
• 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/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index f9f5610..b713206 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -517,4 +517,5 @@ test('T12064', extra_clean(['T12064.hi-boot', 'T12064.o-boot', 'T11062a.hi', 'T1
test('T11974', normal, compile, [''])
test('T12067', extra_clean(['T12067a.hi', 'T12067a.o']),
multimod_compile, ['T12067', '-v0'])
+test('T10635', normal, compile, [''])
test('T12170b', normal, compile, [''])
diff --git a/testsuite/tests/warnings/should_compile/PluralS.stderr b/testsuite/tests/warnings/should_compile/PluralS.stderr
index b1ceab6..416ebb8 100644
--- a/testsuite/tests/warnings/should_compile/PluralS.stderr
+++ b/testsuite/tests/warnings/should_compile/PluralS.stderr
@@ -14,12 +14,12 @@ PluralS.hs:17:24: warning: [-Wtype-defaults (in -Wall)]
In an equation for ‘defaultingNumAndShow’:
defaultingNumAndShow = show 123
-PluralS.hs:23:1: warning: [-Wredundant-constraints (in -Wall)]
+PluralS.hs:23:1: warning: [-Wredundant-constraints]
• Redundant constraint: Num a
• In the type signature for:
redundantNum :: (Num a, Num a) => a
-PluralS.hs:26:1: warning: [-Wredundant-constraints (in -Wall)]
+PluralS.hs:26:1: warning: [-Wredundant-constraints]
• 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