[project @ 2001-08-04 06:19:54 by ken]
[ghc-hetmet.git] / ghc / lib / std / PrelMain.lhs
index a64b361..d484482 100644 (file)
@@ -1,5 +1,7 @@
+% ------------------------------------------------------------------------------
+% $Id: PrelMain.lhs,v 1.9 2001/05/21 14:07:31 simonmar Exp $
 %
-% (c) The AQUA Project, Glasgow University, 1994-1997
+% (c) The University of Glasgow, 1994-2000
 %
 
 \section[PrelMain]{Module @PrelMain@}
@@ -7,14 +9,14 @@
 \begin{code}
 module PrelMain( mainIO ) where
 
-import Prelude
 import {-# SOURCE #-} qualified Main   -- for type of "Main.main"
-import PrelErr ( ioError )
-\end{code}
 
-\begin{code}
+import IO
+import PrelException
+import PrelTopHandler
+
 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 -> ioError (showsPrec 0 err "\n"))
+mainIO = catchException Main.main topHandler
 \end{code}