summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-12-29 15:16:24 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-08 10:17:55 -0500
commit4435a8e0b74337fe5faddb9c46691f0f5bf9e653 (patch)
tree1d8ac7f540770c017f5e26f51d2788666203fbed /compiler/main/DynFlags.hs
parentaede171a59f9b7b8022548c385a1cb8c4589f905 (diff)
downloadhaskell-4435a8e0b74337fe5faddb9c46691f0f5bf9e653.tar.gz
Introduce -Wcompat-unqualified-imports
This implements the warning proposed in option (B) of the Data.List.singleton CLC [discussion][]. This warning, which is included in `-Wcompat` is intended to help users identify imports of modules that will change incompatibly in future GHC releases. This currently only includes `Data.List` due to the expected specialisation and addition of `Data.List.singleton`. Fixes #17244. [discussion]: https://groups.google.com/d/msg/haskell-core-libraries/q3zHLmzBa5E/PmlAs_kYAQAJ
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r--compiler/main/DynFlags.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index be40ff9e2e..3064c1991d 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -926,6 +926,7 @@ data WarningFlag =
| Opt_WarnUnusedPackages -- Since 8.10
| Opt_WarnInferredSafeImports -- Since 8.10
| Opt_WarnMissingSafeHaskellMode -- Since 8.10
+ | Opt_WarnCompatUnqualifiedImports -- Since 8.10
| Opt_WarnDerivingDefaults
deriving (Eq, Show, Enum)
@@ -4163,7 +4164,8 @@ wWarningFlagsDeps = [
flagSpec "partial-fields" Opt_WarnPartialFields,
flagSpec "prepositive-qualified-module"
Opt_WarnPrepositiveQualifiedModule,
- flagSpec "unused-packages" Opt_WarnUnusedPackages
+ flagSpec "unused-packages" Opt_WarnUnusedPackages,
+ flagSpec "compat-unqualified-imports" Opt_WarnCompatUnqualifiedImports
]
-- | These @-\<blah\>@ flags can all be reversed with @-no-\<blah\>@
@@ -4931,6 +4933,7 @@ minusWcompatOpts
, Opt_WarnSemigroup
, Opt_WarnNonCanonicalMonoidInstances
, Opt_WarnStarIsType
+ , Opt_WarnCompatUnqualifiedImports
]
enableUnusedBinds :: DynP ()