send usage info to stdout, not stderr
[ghc-hetmet.git] / ghc / compiler / main / Main.hs
index 95891f7..17eb526 100644 (file)
@@ -405,7 +405,12 @@ showBanner cli_mode dflags = do
        do hPutStr stderr "Glasgow Haskell Compiler, Version "
           hPutStr stderr cProjectVersion
           hPutStr stderr ", for Haskell 98, compiled by GHC version "
+#ifdef GHCI
+          -- GHCI is only set when we are bootstrapping...
+          hPutStrLn stderr cProjectVersion
+#else
           hPutStrLn stderr cBooterVersion
+#endif
 
 showVersion :: IO ()
 showVersion = do
@@ -422,8 +427,8 @@ showGhcUsage cli_mode = do
   exitWith ExitSuccess
   where
      dump ""         = return ()
-     dump ('$':'$':s) = hPutStr stderr progName >> dump s
-     dump (c:s)              = hPutChar stderr c >> dump s
+     dump ('$':'$':s) = putStr progName >> dump s
+     dump (c:s)              = putChar c >> dump s
 
 -- -----------------------------------------------------------------------------
 -- Util