X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FIOBase.hs;h=4177b07ae317bf167a2c4dd8f049bef1117bbea0;hb=be2750a0a11b919fb03cc070074e430f88bdfa90;hp=dca72c03f988ab00d74f0e89d1770d486e34f95a;hpb=7e8f2da24a671fa3b314e49f244cabe37af7ccd2;p=ghc-base.git diff --git a/GHC/IOBase.hs b/GHC/IOBase.hs index dca72c0..4177b07 100644 --- a/GHC/IOBase.hs +++ b/GHC/IOBase.hs @@ -1,4 +1,6 @@ +{-# LANGUAGE DeriveDataTypeable #-} {-# OPTIONS_HADDOCK hide #-} + ----------------------------------------------------------------------------- -- | -- Module : GHC.IOBase @@ -60,5 +62,32 @@ import GHC.IOArray import GHC.IORef import GHC.MVar import Foreign.C.Types +import GHC.Show +import Data.Typeable type FD = CInt + +-- Backwards compat: this was renamed to BlockedIndefinitelyOnMVar +data BlockedOnDeadMVar = BlockedOnDeadMVar + deriving Typeable + +instance Exception BlockedOnDeadMVar + +instance Show BlockedOnDeadMVar where + showsPrec _ BlockedOnDeadMVar = showString "thread blocked indefinitely" + +blockedOnDeadMVar :: SomeException -- for the RTS +blockedOnDeadMVar = toException BlockedOnDeadMVar + + +-- Backwards compat: this was renamed to BlockedIndefinitelyOnSTM +data BlockedIndefinitely = BlockedIndefinitely + deriving Typeable + +instance Exception BlockedIndefinitely + +instance Show BlockedIndefinitely where + showsPrec _ BlockedIndefinitely = showString "thread blocked indefinitely" + +blockedIndefinitely :: SomeException -- for the RTS +blockedIndefinitely = toException BlockedIndefinitely