Haskell Hierarchical Libraries (base package)ContentsIndex
GHC.TopHandler
Portability non-portable (GHC Extensions)
Stability internal
Maintainer cvs-ghc@haskell.org
Description
Support for catching exceptions raised during top-level computations (e.g. Main.main, forkIO, and foreign exports)
Synopsis
runIO :: IO a -> IO a
runNonIO :: a -> IO a
reportStackOverflow :: Bool -> IO a
reportError :: Bool -> String -> IO a
Documentation
runIO :: IO a -> IO a
runIO is wrapped around Main.main by TcModule. It is also wrapped around every foreign export and foreign import "wrapper" to mop up any uncaught exceptions. Thus, the result of running exitWith in a foreign-exported function is the same as in the main thread: it terminates the program.
runNonIO :: a -> IO a
The same as runIO, but for non-IO computations. Used for wrapping foreign export and foreign import "wrapper" when these are used to export Haskell functions with non-IO types.
reportStackOverflow :: Bool -> IO a
reportError :: Bool -> String -> IO a
Produced by Haddock version 0.6