Commit abbe6968 authored by panne's avatar panne
Browse files

[project @ 2003-08-27 13:28:01 by panne]

Added short option -V for long option --version
parent 8a45d6bb
-----------------------------------------------------------------------------
-- $Id: DriverFlags.hs,v 1.120 2003/08/20 15:07:56 simonmar Exp $
-- $Id: DriverFlags.hs,v 1.121 2003/08/27 13:28:01 panne Exp $
--
-- Driver flags
--
......@@ -156,9 +156,8 @@ static_flags =
, ( "-help" , NoArg showGhcUsage)
, ( "-print-libdir" , NoArg (do getTopDir >>= putStrLn
exitWith ExitSuccess))
, ( "-version" , NoArg (do putStrLn (cProjectName
++ ", version " ++ cProjectVersion)
exitWith ExitSuccess))
, ( "V" , NoArg showVersion)
, ( "-version" , NoArg showVersion)
, ( "-numeric-version", NoArg (do putStrLn cProjectVersion
exitWith ExitSuccess))
......@@ -647,3 +646,8 @@ setVerbosity n
| otherwise = throwDyn (UsageError "can't parse verbosity flag (-v<n>)")
addCmdlineHCInclude a = updDynFlags (\s -> s{cmdlineHcIncludes = a : cmdlineHcIncludes s})
showVersion :: IO ()
showVersion = do
putStrLn (cProjectName ++ ", version " ++ cProjectVersion)
exitWith ExitSuccess
......@@ -44,6 +44,12 @@
<entry>dynamic</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-V</option></entry>
<entry>display GHC version</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;version</option></entry>
<entry>display GHC version</entry>
......
......@@ -341,7 +341,9 @@ module X where
</varlistentry>
<varlistentry>
<term><option>-V</option></term>
<term><option>&ndash;&ndash;version</option></term>
<indexterm><primary><option>-V</option></primary></indexterm>
<indexterm><primary><option>&ndash;&ndash;version</option></primary></indexterm>
<listitem>
<para>Print a one-line string including GHC's version number.</para>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment