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