summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Session.hs
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2020-10-13 02:39:12 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-10-19 18:16:20 -0400
commitb5b3e34ec39fc89a0bcd0b60cf9a4962c89ba72f (patch)
tree82f4f5360a5450d5e86fb9e0204af7b4712ae26b /compiler/GHC/Driver/Session.hs
parentd858a3aebee5adc447556b668b65b6e46370d8c0 (diff)
downloadhaskell-b5b3e34ec39fc89a0bcd0b60cf9a4962c89ba72f.tar.gz
Implement -Woperator-whitespace (#18834)
This patch implements two related warnings: -Woperator-whitespace-ext-conflict warns on uses of infix operators that would be parsed differently were a particular GHC extension enabled -Woperator-whitespace warns on prefix, suffix, and tight infix uses of infix operators Updates submodules: haddock, containers.
Diffstat (limited to 'compiler/GHC/Driver/Session.hs')
-rw-r--r--compiler/GHC/Driver/Session.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 4c3052d023..ccc7d2b8a3 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -3328,7 +3328,9 @@ wWarningFlagsDeps = [
Opt_WarnPrepositiveQualifiedModule,
flagSpec "unused-packages" Opt_WarnUnusedPackages,
flagSpec "compat-unqualified-imports" Opt_WarnCompatUnqualifiedImports,
- flagSpec "invalid-haddock" Opt_WarnInvalidHaddock
+ flagSpec "invalid-haddock" Opt_WarnInvalidHaddock,
+ flagSpec "operator-whitespace-ext-conflict" Opt_WarnOperatorWhitespaceExtConflict,
+ flagSpec "operator-whitespace" Opt_WarnOperatorWhitespace
]
-- | These @-\<blah\>@ flags can all be reversed with @-no-\<blah\>@
@@ -4085,7 +4087,8 @@ standardWarnings -- see Note [Documenting warning flags]
Opt_WarnInaccessibleCode,
Opt_WarnSpaceAfterBang,
Opt_WarnNonCanonicalMonadInstances,
- Opt_WarnNonCanonicalMonoidInstances
+ Opt_WarnNonCanonicalMonoidInstances,
+ Opt_WarnOperatorWhitespaceExtConflict
]
-- | Things you get with -W