a64b36157f7e99696ea4c5920ba2eb0f16d7af22
[ghc-hetmet.git] / ghc / lib / std / PrelMain.lhs
1 %
2 % (c) The AQUA Project, Glasgow University, 1994-1997
3 %
4
5 \section[PrelMain]{Module @PrelMain@}
6
7 \begin{code}
8 module PrelMain( mainIO ) where
9
10 import Prelude
11 import {-# SOURCE #-} qualified Main    -- for type of "Main.main"
12 import PrelErr ( ioError )
13 \end{code}
14
15 \begin{code}
16 mainIO :: IO ()         -- It must be of type (IO t) because that's what
17                         -- the RTS expects.  GHC doesn't check this, so
18                         -- make sure this type signature stays!
19 mainIO = catch Main.main (\err -> ioError (showsPrec 0 err "\n"))
20 \end{code}