Haskell Core Libraries (base package)ParentContentsIndex
GHC.TopHandler
Portability non-portable (GHC Extensions)
Stability internal
Maintainer cvs-ghc@haskell.org
Description
Top-level IO actions want to catch exceptions (e.g., forkIO and mainIO) and report them - topHandler is the exception handler they should use for this.
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 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.4