summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Elagin <kirelagin@gmail.com>2020-05-15 18:00:33 +0300
committerBen Gamari <ben@smart-cactus.org>2021-04-07 15:04:04 -0400
commitc41f77e879ac68a81a8ee0bb37ba27b42c850cee (patch)
tree8ad7572836742ecdedda85abf7dd8ae693d67f02
parentbc187153d7b78758ca04fe5b032356f691714021 (diff)
downloadhaskell-c41f77e879ac68a81a8ee0bb37ba27b42c850cee.tar.gz
Winferred-safe-imports: Do not exit with error
Currently, when -Winferred-safe-imports is enabled, even when it is not turned into an error, the compiler will still exit with exit code 1 if this warning was emitted. Make sure it is really treated as a warning. (cherry picked from commit d412d7a3783b4fc5d3078541a60996e249b4157c)
-rw-r--r--compiler/main/HscMain.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index 9bb6b4e391..7d3e3bb2e3 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -1182,7 +1182,7 @@ hscCheckSafe' m l = do
where
inferredImportWarn = unitBag
$ makeIntoWarning (Reason Opt_WarnInferredSafeImports)
- $ mkErrMsg dflags l (pkgQual dflags)
+ $ mkWarnMsg dflags l (pkgQual dflags)
$ sep
[ text "Importing Safe-Inferred module "
<> ppr (moduleName m)