{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+
+#include "Typeable.h"
+
-----------------------------------------------------------------------------
-- |
-- Module : Control.Exception
RecConError(..),
RecSelError(..),
RecUpdError(..),
+ ErrorCall(..),
-- * Throwing exceptions
throwIO, -- :: Exception -> IO a
-----
data PatternMatchFail = PatternMatchFail String
- deriving Typeable
+INSTANCE_TYPEABLE0(PatternMatchFail,patternMatchFailTc,"PatternMatchFail")
instance Exception PatternMatchFail
-----
data RecSelError = RecSelError String
- deriving Typeable
+INSTANCE_TYPEABLE0(RecSelError,recSelErrorTc,"RecSelError")
instance Exception RecSelError
-----
data RecConError = RecConError String
- deriving Typeable
+INSTANCE_TYPEABLE0(RecConError,recConErrorTc,"RecConError")
instance Exception RecConError
-----
data RecUpdError = RecUpdError String
- deriving Typeable
+INSTANCE_TYPEABLE0(RecUpdError,recUpdErrorTc,"RecUpdError")
instance Exception RecUpdError
-----
data NoMethodError = NoMethodError String
- deriving Typeable
+INSTANCE_TYPEABLE0(NoMethodError,noMethodErrorTc,"NoMethodError")
instance Exception NoMethodError
-----
data AssertionFailed = AssertionFailed String
- deriving Typeable
+INSTANCE_TYPEABLE0(AssertionFailed,assertionFailedTc,"AssertionFailed")
instance Exception AssertionFailed
-----
data NonTermination = NonTermination
- deriving Typeable
+INSTANCE_TYPEABLE0(NonTermination,nonTerminationTc,"NonTermination")
instance Exception NonTermination
-----
data Deadlock = Deadlock
- deriving Typeable
+INSTANCE_TYPEABLE0(Deadlock,deadlockTc,"Deadlock")
instance Exception Deadlock
-----
data NestedAtomically = NestedAtomically
- deriving Typeable
+INSTANCE_TYPEABLE0(NestedAtomically,nestedAtomicallyTc,"NestedAtomically")
instance Exception NestedAtomically
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+
+#include "Typeable.h"
+
-----------------------------------------------------------------------------
-- |
-- Module : Control.OldException
-- fields are missing from some of the constructors. The
-- 'String' argument gives the location of the
-- record update in the source program.
- deriving Typeable
+INSTANCE_TYPEABLE0(Exception,exceptionTc,"Exception")
nonTermination :: SomeException
nonTermination = toException NonTermination
--
-------------------------------------------------------------------------------
+#include "Typeable.h"
+
module System.Timeout ( timeout ) where
#if __NHC__
import Control.Concurrent (forkIO, threadDelay, myThreadId, killThread)
import Control.Exception (Exception, handleJust, throwTo, bracket)
import Data.Dynamic (Typeable, fromDynamic)
+import Data.Typeable
import Data.Unique (Unique, newUnique)
-- An internal type that is thrown as a dynamic exception to
-- interrupt the running IO computation when the timeout has
-- expired.
-data Timeout = Timeout Unique deriving (Eq, Typeable)
+data Timeout = Timeout Unique deriving Eq
+INSTANCE_TYPEABLE0(Timeout,timeoutTc,"Timeout")
instance Show Timeout where
show _ = "<<timeout>>"