diff options
author | Lennart Kolmodin <kolmodin@gmail.com> | 2014-11-20 23:28:34 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-11-20 23:32:16 -0600 |
commit | 417809baaf7d1fc6a7c708fa195ace277059c3d3 (patch) | |
tree | 850eca2017a80024cbe41115590aa0c955bffceb /compiler/main/StaticFlags.hs | |
parent | c6322eebea61dd29d0dab698cb89334596851b9d (diff) | |
download | haskell-wip/merge.tar.gz |
ghc allow --show-options and --interactive togetherwip/merge
Summary:
Previously --show-options showed all options that GHC accepts.
Now, it'll only show the options that have effect in non-interactive
modes.
This change also adds support for using --interactive together with
--show-options, making it show all options that have effect in the interactive
mode.
The CmdLineParser is updated to know about ghc modes, and then each flag
is annotated with which mode it has effect.
This fixes #9259.
Test Plan:
Try out --show-options with --interactive on the command line. With and without
--interactive should give different results.
Reviewers: austin
Reviewed By: austin
Subscribers: jstolarek, thomie, carter, simonmar
Differential Revision: https://phabricator.haskell.org/D337
GHC Trac Issues: #9259
Conflicts:
compiler/main/DynFlags.hs
Diffstat (limited to 'compiler/main/StaticFlags.hs')
-rw-r--r-- | compiler/main/StaticFlags.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index 123db17f9f..4b4403a3ea 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -119,17 +119,17 @@ staticFlags = unsafePerformIO $ do flagsStatic :: [Flag IO] flagsStatic = [ ------ Debugging ---------------------------------------------------- - Flag "dppr-debug" (PassFlag addOptEwM) - , Flag "dno-debug-output" (PassFlag addOptEwM) + defFlag "dppr-debug" (PassFlag addOptEwM) + , defFlag "dno-debug-output" (PassFlag addOptEwM) -- rest of the debugging flags are dynamic ------ Compiler flags ----------------------------------------------- -- All other "-fno-<blah>" options cancel out "-f<blah>" on the hsc cmdline - , Flag "fno-" + , defFlag "fno-" (PrefixPred (\s -> isStaticFlag ("f"++s)) (\s -> removeOptEwM ("-f"++s))) -- Pass all remaining "-f<blah>" options to hsc - , Flag "f" (AnySuffixPred isStaticFlag addOptEwM) + , defFlag "f" (AnySuffixPred isStaticFlag addOptEwM) ] |