summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ellis <tom-git@jaguarpaw.co.uk>2020-11-26 19:01:03 +0000
committerTom Ellis <tom-git@jaguarpaw.co.uk>2020-12-19 10:18:55 +0000
commit32b6ebe8efd45a32ebe3696f32ac3d84a9e8e30c (patch)
tree8a6177969e315658e3b114875e97d07b69e5b424
parent366b58858a773fe03d7b7ba93ba9d8287b901229 (diff)
downloadhaskell-32b6ebe8efd45a32ebe3696f32ac3d84a9e8e30c.tar.gz
Add two warnings to -Wall
* -Wincomplete-uni-patterns * -Wincomplete-record-updates See https://gitlab.haskell.org/ghc/ghc/-/issues/15656
-rw-r--r--compiler/GHC/Driver/Session.hs4
-rw-r--r--docs/users_guide/using-warnings.rst2
-rw-r--r--testsuite/tests/deSugar/should_compile/DsStrictWarn.stderr2
-rw-r--r--testsuite/tests/deSugar/should_compile/T5455.stderr4
-rw-r--r--testsuite/tests/pmcheck/should_compile/T18572.hs2
-rw-r--r--testsuite/tests/pmcheck/should_compile/T18572.stderr2
6 files changed, 8 insertions, 8 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index c4b28b1210..f7cdd5944b 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -4099,7 +4099,9 @@ minusWallOpts
Opt_WarnMissingPatternSynonymSignatures,
Opt_WarnUnusedRecordWildcards,
Opt_WarnRedundantRecordWildcards,
- Opt_WarnStarIsType
+ Opt_WarnStarIsType,
+ Opt_WarnIncompleteUniPatterns,
+ Opt_WarnIncompletePatternsRecUpd
]
-- | Things you get with -Weverything, i.e. *all* known warnings flags
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 5eb4bc51c9..400db598ca 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -94,8 +94,6 @@ The following flags are simple ways to select standard "packages" of warnings:
.. hlist::
:columns: 3
- * :ghc-flag:`-Wincomplete-uni-patterns`
- * :ghc-flag:`-Wincomplete-record-updates`
* :ghc-flag:`-Wmonomorphism-restriction`
* :ghc-flag:`-Wimplicit-prelude`
* :ghc-flag:`-Wmissing-local-signatures`
diff --git a/testsuite/tests/deSugar/should_compile/DsStrictWarn.stderr b/testsuite/tests/deSugar/should_compile/DsStrictWarn.stderr
index a7c76fff44..8dedef3b5d 100644
--- a/testsuite/tests/deSugar/should_compile/DsStrictWarn.stderr
+++ b/testsuite/tests/deSugar/should_compile/DsStrictWarn.stderr
@@ -1,4 +1,4 @@
-DsStrictWarn.hs:7:11: warning: [-Wincomplete-uni-patterns]
+DsStrictWarn.hs:7:11: warning: [-Wincomplete-uni-patterns (in -Wall)]
Pattern match(es) are non-exhaustive
In a pattern binding: Patterns of type ‘String’ not matched: []
diff --git a/testsuite/tests/deSugar/should_compile/T5455.stderr b/testsuite/tests/deSugar/should_compile/T5455.stderr
index ff2b578c65..4bff3560e4 100644
--- a/testsuite/tests/deSugar/should_compile/T5455.stderr
+++ b/testsuite/tests/deSugar/should_compile/T5455.stderr
@@ -1,8 +1,8 @@
-T5455.hs:8:11: warning: [-Wincomplete-uni-patterns]
+T5455.hs:8:11: warning: [-Wincomplete-uni-patterns (in -Wall)]
Pattern match(es) are non-exhaustive
In a pattern binding: Patterns of type ‘String’ not matched: []
-T5455.hs:13:13: warning: [-Wincomplete-uni-patterns]
+T5455.hs:13:13: warning: [-Wincomplete-uni-patterns (in -Wall)]
Pattern match(es) are non-exhaustive
In a pattern binding: Patterns of type ‘String’ not matched: []
diff --git a/testsuite/tests/pmcheck/should_compile/T18572.hs b/testsuite/tests/pmcheck/should_compile/T18572.hs
index 9a0dd07201..df716f967a 100644
--- a/testsuite/tests/pmcheck/should_compile/T18572.hs
+++ b/testsuite/tests/pmcheck/should_compile/T18572.hs
@@ -1,4 +1,4 @@
-{-# OPTIONS_GHC -Wincomplete-uni-patterns -Wincomplete-patterns -fforce-recomp #-}
+{-# OPTIONS_GHC -fforce-recomp #-}
{-# LANGUAGE DataKinds, KindSignatures, GADTs #-}
module T18572 where
diff --git a/testsuite/tests/pmcheck/should_compile/T18572.stderr b/testsuite/tests/pmcheck/should_compile/T18572.stderr
index a5d14d5c33..7fa14f7127 100644
--- a/testsuite/tests/pmcheck/should_compile/T18572.stderr
+++ b/testsuite/tests/pmcheck/should_compile/T18572.stderr
@@ -11,7 +11,7 @@ T18572.hs:12:1: warning: [-Woverlapping-patterns (in -Wdefault)]
Pattern match is redundant
In a pattern binding: STrue = ...
-T18572.hs:12:1: warning: [-Wincomplete-uni-patterns]
+T18572.hs:12:1: warning: [-Wincomplete-uni-patterns (in -Wall)]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ‘SBool 'False’ not matched: SFalse