summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Session.hs
diff options
context:
space:
mode:
authorAdam Gundry <adam@well-typed.com>2021-01-08 19:27:45 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-02-26 16:25:39 -0500
commit80eda911ef1ea711a9e3e51ad510dfe5a9a09ae9 (patch)
treeaa7e1614c76b5c5c31ca772c8300a115c62e9684 /compiler/GHC/Driver/Session.hs
parent29e7f318209794206033065cdc0874a5afe0ad47 (diff)
downloadhaskell-80eda911ef1ea711a9e3e51ad510dfe5a9a09ae9.tar.gz
Implement -Wambiguous-fields
Fixes #18966. Adds a new warning -Wambiguous-fields for uses of field selectors or record updates that will be rejected in the future, when the DuplicateRecordFields extension is simplified per https://github.com/ghc-proposals/ghc-proposals/pull/366.
Diffstat (limited to 'compiler/GHC/Driver/Session.hs')
-rw-r--r--compiler/GHC/Driver/Session.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 7afcf7309c..a0a6153b0b 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -3055,6 +3055,7 @@ wWarningFlagsDeps = [
-- Please keep the list of flags below sorted alphabetically
flagSpec "alternative-layout-rule-transitional"
Opt_WarnAlternativeLayoutRuleTransitional,
+ flagSpec "ambiguous-fields" Opt_WarnAmbiguousFields,
depFlagSpec "auto-orphans" Opt_WarnAutoOrphans
"it has no effect",
flagSpec "cpp-undef" Opt_WarnCPPUndef,
@@ -3909,6 +3910,7 @@ standardWarnings -- see Note [Documenting warning flags]
Opt_WarnDerivingDefaults,
Opt_WarnOverflowedLiterals,
Opt_WarnEmptyEnumerations,
+ Opt_WarnAmbiguousFields,
Opt_WarnMissingFields,
Opt_WarnMissingMethods,
Opt_WarnWrongDoBind,