From: simonpj@microsoft.com Date: Thu, 11 Jan 2007 09:01:23 +0000 (+0000) Subject: Log-message for: Improve command-line parser (add OptIntSuffix); make -fliberate... X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=1517ef883f04f1036809978f6639a0104d741073 Log-message for: Improve command-line parser (add OptIntSuffix); make -fliberate-case-threshold dynamic (Alas, Darcs failed to record my log-message for the above patch, so this patch is an attempt to add the log message retrospectively.) Parsing options numeric arguments, such as -fliberate-case-threshold=30 for dynamic flags wasn't being handled well. I elaborated the command-line parser to have a new constructor, OptIntSuffix, for this case, and did the consequential changes. This patch also makes the -fliberate-case-threshold flag into a dynamic flag. --- diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs index 2a92a32..ac73e94 100644 --- a/compiler/main/CmdLineParser.hs +++ b/compiler/main/CmdLineParser.hs @@ -33,7 +33,7 @@ data OptKind m -- Suppose the flag is -f | AnySuffix (String -> m ()) -- -f or -farg; pass entire "-farg" to fn | PrefixPred (String -> Bool) (String -> m ()) | AnySuffixPred (String -> Bool) (String -> m ()) - + processArgs :: Monad m => [(String, OptKind m)] -- cmdline parser spec -> [String] -- args