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.
import SrcLoc ( SrcLoc, noSrcLoc )
import Util ( sortLt )
import Outputable
+import IO ( hPutStr, stderr )
\end{code}
\begin{code}
ghcExit val
= if val /= 0
- then error "Compilation had errors\n"
+ then hPutStr stderr "Compilation had errors\n"
else return ()
\end{code}