diff options
Diffstat (limited to 'ghc/lib/std/PrelMain.lhs')
-rw-r--r-- | ghc/lib/std/PrelMain.lhs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ghc/lib/std/PrelMain.lhs b/ghc/lib/std/PrelMain.lhs new file mode 100644 index 0000000000..a64b36157f --- /dev/null +++ b/ghc/lib/std/PrelMain.lhs @@ -0,0 +1,20 @@ +% +% (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 PrelErr ( ioError ) +\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 = catch Main.main (\err -> ioError (showsPrec 0 err "\n")) +\end{code} |