summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorSean Gillespie <sean@mistersg.net>2017-06-12 17:04:05 -0400
committerBen Gamari <ben@smart-cactus.org>2017-06-12 17:04:06 -0400
commitaf9612bf862daaa99384eefa3059054053ecbee8 (patch)
tree73c84293f84ce6b4802728e68ddb2ce983a82bd3 /ghc
parent2088d0be17dccfa91a4759bdbb20faae77c8dbed (diff)
downloadhaskell-af9612bf862daaa99384eefa3059054053ecbee8.tar.gz
Make -w less aggressive (Trac #12056)
Previously -w combined with -Wunrecognised-warning-flags would not report unrecognized flags. Reviewers: austin, bgamari, dfeuer Reviewed By: bgamari Subscribers: dfeuer, rwbarton, thomie GHC Trac Issues: #12056 Differential Revision: https://phabricator.haskell.org/D3581
Diffstat (limited to 'ghc')
-rw-r--r--ghc/Main.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index 0a4e17aa7d..a75aba3e97 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -46,7 +46,7 @@ import HscTypes
import Packages ( pprPackages, pprPackagesSimple )
import DriverPhases
import BasicTypes ( failed )
-import DynFlags
+import DynFlags hiding (WarnReason(..))
import ErrUtils
import FastString
import Outputable
@@ -149,7 +149,7 @@ main = do
Right postLoadMode ->
main' postLoadMode dflags argv3 flagWarnings
-main' :: PostLoadMode -> DynFlags -> [Located String] -> [Located String]
+main' :: PostLoadMode -> DynFlags -> [Located String] -> [Warn]
-> Ghc ()
main' postLoadMode dflags0 args flagWarnings = do
-- set the default GhcMode, HscTarget and GhcLink. The HscTarget
@@ -543,7 +543,7 @@ isCompManagerMode _ = False
parseModeFlags :: [Located String]
-> IO (Mode,
[Located String],
- [Located String])
+ [Warn])
parseModeFlags args = do
let ((leftover, errs1, warns), (mModeFlag, errs2, flags')) =
runCmdLine (processArgs mode_flags args)
@@ -554,7 +554,7 @@ parseModeFlags args = do
-- See Note [Handling errors when parsing commandline flags]
unless (null errs1 && null errs2) $ throwGhcException $ errorsToGhcException $
- map (("on the commandline", )) $ map unLoc errs1 ++ errs2
+ map (("on the commandline", )) $ map (unLoc . errMsg) errs1 ++ errs2
return (mode, flags' ++ leftover, warns)