X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FTimeout.hs;h=df33625c8d4cca3f8b51052c4c87492481d4cd5f;hb=be2750a0a11b919fb03cc070074e430f88bdfa90;hp=f27a936ed29edb9a984c7088bd40c8ccde5c3a3b;hpb=2ebff97f8efea061ec2c51d8dd8fa19dd880243d;p=ghc-base.git diff --git a/System/Timeout.hs b/System/Timeout.hs index f27a936..df33625 100644 --- a/System/Timeout.hs +++ b/System/Timeout.hs @@ -1,3 +1,8 @@ +{-# LANGUAGE CPP #-} +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} +#endif + ------------------------------------------------------------------------------- -- | -- Module : System.Timeout @@ -27,13 +32,12 @@ import Control.Concurrent (forkIO, threadDelay, myThreadId, killThread) import Control.Exception (Exception, handleJust, throwTo, bracket) import Data.Typeable import Data.Unique (Unique, newUnique) -import GHC.Num -- 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 +newtype Timeout = Timeout Unique deriving Eq INSTANCE_TYPEABLE0(Timeout,timeoutTc,"Timeout") instance Show Timeout where