diff options
author | Nikita Kartashov <snailandmail@gmail.com> | 2016-02-11 11:58:30 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-02-11 16:01:38 +0100 |
commit | 46af6835ac68d104ee56c29afdfa523c165db2fb (patch) | |
tree | 92c691bfda3e5555e3d7254ebc42ebbef5bcc408 /ghc/Main.hs | |
parent | 51a33924fc118d9b6c1db556c75c0d010ef95e18 (diff) | |
download | haskell-46af6835ac68d104ee56c29afdfa523c165db2fb.tar.gz |
compiler: Do not suggest nor complete deprecated flags fix trac issue #11454
Previously, all flags were present in user suggest and completion. This commit
removes the deprecated ones from there. It is done by saving deprecation info
at the moment of flag definition.
Reviewers: rwbarton, austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D1883
Diffstat (limited to 'ghc/Main.hs')
-rw-r--r-- | ghc/Main.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index 73552d3038..5605438f63 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -909,7 +909,7 @@ unknownFlagsErr fs = throwGhcException $ UsageError $ concatMap oneError fs where oneError f = "unrecognised flag: " ++ f ++ "\n" ++ - (case fuzzyMatch f (nub allFlags) of + (case fuzzyMatch f (nub allNonDeprecatedFlags) of [] -> "" suggs -> "did you mean one of:\n" ++ unlines (map (" " ++) suggs)) |