summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-11-14 15:34:17 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-11-14 15:34:17 +0000
commitf300abd65061cdc2cc1db685570fefa958b06679 (patch)
tree3b300ed7ab796d7778d182d14276ffab9937bc0b /utils
parent1f0f098762072ebb6d0f4632b6cee9f7ba51167d (diff)
downloadhaskell-f300abd65061cdc2cc1db685570fefa958b06679.tar.gz
remove --define-name from the --help usage message (#1596)
Diffstat (limited to 'utils')
-rw-r--r--utils/ghc-pkg/Main.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index 996cd62efd..e0bae2f384 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -62,7 +62,7 @@ main :: IO ()
main = do
args <- getArgs
- case getOpt Permute flags args of
+ case getOpt Permute (flags ++ deprecFlags) args of
(cli,_,[]) | FlagHelp `elem` cli -> do
prog <- getProgramName
bye (usageInfo (usageHeader prog) flags)
@@ -120,8 +120,6 @@ flags = [
"automatically build libs for GHCi (with register)",
Option ['?'] ["help"] (NoArg FlagHelp)
"display this help and exit",
- Option ['D'] ["define-name"] (ReqArg toDefined "NAME=VALUE")
- "define NAME as VALUE",
Option ['V'] ["version"] (NoArg FlagVersion)
"output version information and exit",
Option [] ["simple-output"] (NoArg FlagSimpleOutput)
@@ -129,7 +127,13 @@ flags = [
Option [] ["names-only"] (NoArg FlagNamesOnly)
"only print package names, not versions; can only be used with list --simple-output"
]
- where
+
+deprecFlags :: [OptDescr Flag]
+deprecFlags = [
+ Option ['D'] ["define-name"] (ReqArg toDefined "NAME=VALUE")
+ "define NAME as VALUE"
+ ]
+ where
toDefined str =
case break (=='=') str of
(nm,[]) -> FlagDefinedName nm []