diff options
-rw-r--r-- | compiler/main/CmdLineParser.hs | 8 | ||||
-rw-r--r-- | compiler/main/DynFlags.hs | 9 |
2 files changed, 1 insertions, 16 deletions
diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs index c876f58f64..cb30b6fe6c 100644 --- a/compiler/main/CmdLineParser.hs +++ b/compiler/main/CmdLineParser.hs @@ -79,8 +79,6 @@ data OptKind m -- Suppose the flag is -f | FloatSuffix (Float -> EwM m ()) -- -f or -f=n; pass n to fn | PassFlag (String -> EwM m ()) -- -f; pass "-f" fn | AnySuffix (String -> EwM m ()) -- -f or -farg; pass entire "-farg" to fn - | PrefixPred (String -> Bool) (String -> EwM m ()) - | AnySuffixPred (String -> Bool) (String -> EwM m ()) -------------------------------------------------------- @@ -246,9 +244,6 @@ processOneArg opt_kind rest arg args Prefix f | notNull rest_no_eq -> Right (f rest_no_eq, args) | otherwise -> missingArgErr dash_arg - PrefixPred _ f | notNull rest_no_eq -> Right (f rest_no_eq, args) - | otherwise -> unknownFlagErr dash_arg - PassFlag f | notNull rest -> unknownFlagErr dash_arg | otherwise -> Right (f dash_arg, args) @@ -264,7 +259,6 @@ processOneArg opt_kind rest arg args OptPrefix f -> Right (f rest_no_eq, args) AnySuffix f -> Right (f dash_arg, args) - AnySuffixPred _ f -> Right (f dash_arg, args) findArg :: [Flag m] -> String -> Maybe (String, OptKind m) findArg spec arg = @@ -284,14 +278,12 @@ arg_ok (HasArg _) _ _ = True arg_ok (SepArg _) rest _ = null rest arg_ok (Prefix _) _ _ = True -- Missing argument checked for in processOneArg t -- to improve error message (Trac #12625) -arg_ok (PrefixPred p _) rest _ = notNull rest && p (dropEq rest) arg_ok (OptIntSuffix _) _ _ = True arg_ok (IntSuffix _) _ _ = True arg_ok (FloatSuffix _) _ _ = True arg_ok (OptPrefix _) _ _ = True arg_ok (PassFlag _) rest _ = null rest arg_ok (AnySuffix _) _ _ = True -arg_ok (AnySuffixPred p _) _ arg = p arg -- | Parse an Int -- diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index be148796e3..9f0ba57bf5 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -2698,11 +2698,8 @@ allNonDeprecatedFlags = allFlagsDeps False allFlagsDeps :: Bool -> [String] allFlagsDeps keepDeprecated = [ '-':flagName flag | (deprecated, flag) <- flagsAllDeps - , ok (flagOptKind flag) , keepDeprecated || not (isDeprecated deprecated)] - where ok (PrefixPred _ _) = False - ok _ = True - isDeprecated Deprecated = True + where isDeprecated Deprecated = True isDeprecated _ = False {- @@ -2762,10 +2759,6 @@ add_dep_message (PassFlag f) message = PassFlag $ \s -> f s >> deprecate message add_dep_message (AnySuffix f) message = AnySuffix $ \s -> f s >> deprecate message -add_dep_message (PrefixPred pred f) message = - PrefixPred pred $ \s -> f s >> deprecate message -add_dep_message (AnySuffixPred pred f) message = - AnySuffixPred pred $ \s -> f s >> deprecate message ----------------------- The main flags themselves ------------------------------ -- See Note [Updating flag description in the User's Guide] |