From: panne Date: Sun, 17 Apr 2005 10:06:16 +0000 (+0000) Subject: [project @ 2005-04-17 10:06:16 by panne] X-Git-Tag: arity-anal-branch-point~4 X-Git-Url: http://git.megacz.com/?p=ghc-base.git;a=commitdiff_plain;h=82ef8f9d52a6f6eee52ac06ec6baf2bcbb73f10c [project @ 2005-04-17 10:06:16 by panne] Merged "unrecoginzed long opt" fix from Distribution.GetOpt MERGE TO STABLE --- diff --git a/System/Console/GetOpt.hs b/System/Console/GetOpt.hs index 4098c30..fa9f9b2 100644 --- a/System/Console/GetOpt.hs +++ b/System/Console/GetOpt.hs @@ -197,7 +197,7 @@ longOpt ls rs optDescr = long ads arg rs long [ReqArg f _] ('=':xs) rest = (Opt (f xs),rest) long [OptArg f _] [] rest = (Opt (f Nothing),rest) long [OptArg f _] ('=':xs) rest = (Opt (f (Just xs)),rest) - long _ _ rest = (UnreqOpt optStr,rest) + long _ _ rest = (UnreqOpt ("--"++ls),rest) -- handle short option shortOpt :: Char -> String -> [String] -> [OptDescr a] -> (OptKind a,[String])