From 2b20c2bbe7d0cff14b7ee60675399c533450175a Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 16 Jul 2007 22:14:42 +0000 Subject: [PATCH] -w should turn off /all/ options, not just the -Wall ones --- compiler/main/DynFlags.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 28943ab..cbed799 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -650,6 +650,16 @@ minusWallOpts Opt_WarnOrphans ] +-- minuswRemovesOpts should be every warning option +minuswRemovesOpts + = minusWallOpts ++ + [Opt_WarnImplicitPrelude, + Opt_WarnIncompletePatternsRecUpd, + Opt_WarnSimplePatterns, + Opt_WarnMonomorphism, + Opt_WarnTabs + ] + -- ----------------------------------------------------------------------------- -- CoreToDo: abstraction of core-to-core passes to run. @@ -1035,7 +1045,7 @@ dynamic_flags = [ , ( "Werror" , NoArg (setDynFlag Opt_WarnIsError) ) , ( "Wall" , NoArg (mapM_ setDynFlag minusWallOpts) ) , ( "Wnot" , NoArg (mapM_ unSetDynFlag minusWallOpts) ) /* DEPREC */ - , ( "w" , NoArg (mapM_ unSetDynFlag minusWallOpts) ) + , ( "w" , NoArg (mapM_ unSetDynFlag minuswRemovesOpts) ) ------ Optimisation flags ------------------------------------------ , ( "O" , NoArg (upd (setOptLevel 1))) -- 1.7.10.4