Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/7256b301f0fde617e04c8dc47a223b30f1f6eae2 >--------------------------------------------------------------- commit 7256b301f0fde617e04c8dc47a223b30f1f6eae2 Author: Simon Marlow <[email protected]> Date: Tue May 24 15:37:33 2011 +0100 deprecate the -n option (#5180) >--------------------------------------------------------------- compiler/main/DynFlags.hs | 3 +-- compiler/main/SysTools.lhs | 8 ++------ docs/users_guide/flags.xml | 8 +------- docs/users_guide/using.xml | 12 ------------ 4 files changed, 4 insertions(+), 27 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 6e8a341..01e0cf8 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -274,7 +274,6 @@ data DynFlag -- misc opts | Opt_Pp | Opt_ForceRecomp - | Opt_DryRun | Opt_ExcessPrecision | Opt_EagerBlackHoling | Opt_ReadUserPackageConf @@ -1154,7 +1153,7 @@ allFlags = map ('-':) $ --------------- The main flags themselves ------------------ dynamic_flags :: [Flag (CmdLineP DynFlags)] dynamic_flags = [ - Flag "n" (NoArg (setDynFlag Opt_DryRun)) + Flag "n" (NoArg (addWarn "The -n flag is deprecated and no longer has any effect")) , Flag "cpp" (NoArg (setExtensionFlag Opt_Cpp)) , Flag "F" (NoArg (setDynFlag Opt_Pp)) , Flag "#include" diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 497a938..9c086cc 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -788,20 +788,16 @@ data BuildMessage | EOF traceCmd :: DynFlags -> String -> String -> IO () -> IO () --- a) trace the command (at two levels of verbosity) --- b) don't do it at all if dry-run is set +-- trace the command (at two levels of verbosity) traceCmd dflags phase_name cmd_line action = do { let verb = verbosity dflags ; showPass dflags phase_name ; debugTraceMsg dflags 3 (text cmd_line) ; hFlush stderr - -- Test for -n flag - ; unless (dopt Opt_DryRun dflags) $ do { - -- And run it! ; action `catchIO` handle_exn verb - }} + } where handle_exn _verb exn = do { debugTraceMsg dflags 2 (char '\n') ; debugTraceMsg dflags 2 (ptext (sLit "Failed:") <+> text cmd_line <+> text (show exn)) diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index 71790b0..5b55fc6 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -35,13 +35,7 @@ <entry>mode</entry> <entry>-</entry> </row> - <row> - <entry><option>-n</option></entry> - <entry>do a dry run</entry> - <entry>dynamic</entry> - <entry>-</entry> - </row> - <row> + <row> <entry><option>-v</option></entry> <entry>verbose mode (equivalent to <option>-v3</option>)</entry> <entry>dynamic</entry> diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index 115c290..df01521 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -783,18 +783,6 @@ ghc -c Foo.hs</screen> <variablelist> <varlistentry> <term> - <option>-n</option> - <indexterm><primary><option>-n</option></primary></indexterm> - </term> - <listitem> - <para>Does a dry-run, i.e. GHC goes through all the motions - of compiling as normal, but does not actually run any - external commands.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term> <option>-v</option> <indexterm><primary><option>-v</option></primary></indexterm> </term> _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
