diff options
author | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2013-06-04 10:28:32 +0200 |
---|---|---|
committer | Edward Z. Yang <ezyang@mit.edu> | 2013-06-06 12:29:35 -0700 |
commit | a28731b3a14ff6ef9c7dca8327d073e6ebb6b773 (patch) | |
tree | 9d09077d0307c43605c5ac8d15bb4ce44dd5761d /compiler | |
parent | cfe92a8f8482a3c863c3bddc4be894b09fb972ff (diff) | |
download | haskell-a28731b3a14ff6ef9c7dca8327d073e6ebb6b773.tar.gz |
Add --show-options to list all flags (Fixes #7843)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/main/StaticFlags.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index a1104de5f6..09d5772637 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -35,7 +35,10 @@ module StaticFlags ( addOpt, removeOpt, v_opt_C_ready, -- Saving/restoring globals - saveStaticFlagGlobals, restoreStaticFlagGlobals + saveStaticFlagGlobals, restoreStaticFlagGlobals, + + -- For options autocompletion + flagsStatic, flagsStaticNames ) where #include "HsVersions.h" @@ -139,9 +142,13 @@ flagsStatic = [ ] + isStaticFlag :: String -> Bool -isStaticFlag f = - f `elem` [ +isStaticFlag f = f `elem` flagsStaticNames + + +flagsStaticNames :: [String] +flagsStaticNames = [ "fdicts-strict", "fno-state-hack", "fno-opt-coercion", |