[project @ 1998-01-22 15:54:43 by sof]
[ghc-hetmet.git] / ghc / lib / ghc / GHCmain.lhs
index 0a67a1d..fa143b6 100644 (file)
@@ -9,11 +9,12 @@ module GHCmain( mainIO ) where
 
 import Prelude
 import {-# SOURCE #-} qualified Main   -- for type of "Main.main"
+import GHCerr ( ioError )
 \end{code}
 
 \begin{code}
 mainIO :: IO ()                -- It must be of type (IO t) because that's what
                        -- the RTS expects.  GHC doesn't check this, so
                        -- make sure this type signature stays!
-mainIO = catch Main.main (\err -> error ("I/O error: "++showsPrec 0 err "\n"))
+mainIO = catch Main.main (\err -> ioError (showsPrec 0 err "\n"))
 \end{code}