X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fmain%2FCmdLineParser.hs;h=dfe756bfee3bd8bf98dfd9626e83049da7dd1ff3;hp=dfdea62f255da2a26337d9a51976481bc12bd93f;hb=46bef1c09f499c5b34a00b650614bebfa1d6ba4b;hpb=3e39f8485ee4bd1ef6e3e7153ea88e45bfa9218e diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs index dfdea62..dfe756b 100644 --- a/compiler/main/CmdLineParser.hs +++ b/compiler/main/CmdLineParser.hs @@ -23,6 +23,8 @@ import Outputable import Panic import SrcLoc +import Data.List + data Flag m = Flag { flagName :: String, -- flag, without the leading - @@ -118,7 +120,7 @@ findArg spec arg = case [ (removeSpaces rest, optKind, flagDeprecated flag) | flag <- spec, let optKind = flagOptKind flag, - Just rest <- [maybePrefixMatch (flagName flag) arg], + Just rest <- [stripPrefix (flagName flag) arg], arg_ok optKind rest arg ] of [] -> Nothing