Log-message for: Improve command-line parser (add OptIntSuffix); make -fliberate...
authorsimonpj@microsoft.com <unknown>
Thu, 11 Jan 2007 09:01:23 +0000 (09:01 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 11 Jan 2007 09:01:23 +0000 (09:01 +0000)
(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.

compiler/main/CmdLineParser.hs

index 2a92a32..ac73e94 100644 (file)
@@ -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