We'll probably need to do the same for some other exceptions too
instance Exception IOB.Exception
throwIO :: Exception e => e -> IOB.IO a
instance Exception IOB.Exception
throwIO :: Exception e => e -> IOB.IO a
+
+toException :: Exception e => e -> SomeException
Exception(..), ArithException(..), AsyncException(..), ArrayException(..),
stackOverflow, heapOverflow, ioException,
IOError, IOException(..), IOErrorType(..), ioError, userError,
Exception(..), ArithException(..), AsyncException(..), ArrayException(..),
stackOverflow, heapOverflow, ioException,
IOError, IOException(..), IOErrorType(..), ioError, userError,
+ ExitCode(..),
+ -- The RTS calls this
+ nonTermination,
import GHC.List
import GHC.Read
import Foreign.C.Types (CInt)
import GHC.List
import GHC.Read
import Foreign.C.Types (CInt)
-import {-# SOURCE #-} GHC.Exception ( throwIO )
+import {-# SOURCE #-} GHC.Exception ( SomeException, toException, throwIO )
#ifndef __HADDOCK__
import {-# SOURCE #-} Data.Typeable ( showsTypeRep )
#ifndef __HADDOCK__
import {-# SOURCE #-} Data.Typeable ( showsTypeRep )
-- 'String' argument gives the location of the
-- record update in the source program.
-- 'String' argument gives the location of the
-- record update in the source program.
+nonTermination :: SomeException
+nonTermination = toException NonTermination
+
-- |The type of arithmetic exceptions
data ArithException
= Overflow
-- |The type of arithmetic exceptions
data ArithException
= Overflow