fa143b666974e9af76e50e82b83c02f36a454cfa
[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 import GHCerr ( 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}