summaryrefslogtreecommitdiff
path: root/ghc/lib/std/PrelMain.lhs
blob: 3307bb7299287549ebd676b6a23a6651105798eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
%
% (c) The AQUA Project, Glasgow University, 1994-1997
%

\section[PrelMain]{Module @PrelMain@}

\begin{code}
module PrelMain( mainIO ) where

import Prelude
import {-# SOURCE #-} qualified Main	-- for type of "Main.main"

import PrelException
import PrelHandle ( topHandler )

\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 = catchException Main.main (topHandler True)
\end{code}