[project @ 2000-08-09 15:19:58 by rrt]
authorrrt <unknown>
Wed, 9 Aug 2000 15:19:58 +0000 (15:19 +0000)
committerrrt <unknown>
Wed, 9 Aug 2000 15:19:58 +0000 (15:19 +0000)
Changed use of error for "Compilation failed" message to hPutStr stderr;
seemed better to SWM, and stops error messages being different on Windows
where RTS hooks don't work with DLLs.

ghc/compiler/main/ErrUtils.lhs

index bf94690..05d0fd5 100644 (file)
@@ -20,6 +20,7 @@ import Bag            ( Bag, bagToList, isEmptyBag )
 import SrcLoc          ( SrcLoc, noSrcLoc )
 import Util            ( sortLt )
 import Outputable
+import IO              ( hPutStr, stderr )
 \end{code}
 
 \begin{code}
@@ -85,7 +86,7 @@ ghcExit :: Int -> IO ()
 
 ghcExit val
   = if val /= 0
-    then error "Compilation had errors\n"
+    then hPutStr stderr "Compilation had errors\n"
     else return ()
 \end{code}