1 {-# OPTIONS_HADDOCK hide #-}
2 -----------------------------------------------------------------------------
5 -- Copyright : (c) The University of Glasgow 1994-2009
6 -- License : see libraries/base/LICENSE
8 -- Maintainer : cvs-ghc@haskell.org
9 -- Stability : internal
10 -- Portability : non-portable (GHC Extensions)
12 -- Backwards-compatibility interface
14 -----------------------------------------------------------------------------
17 module GHC.IOBase {-# DEPRECATED "use GHC.IO instead" #-} (
18 IO(..), unIO, failIO, liftIO, bindIO, thenIO, returnIO,
19 unsafePerformIO, unsafeInterleaveIO,
20 unsafeDupablePerformIO, unsafeDupableInterleaveIO,
23 -- To and from from ST
24 stToIO, ioToST, unsafeIOToST, unsafeSTToIO,
27 IORef(..), newIORef, readIORef, writeIORef,
28 IOArray(..), newIOArray, readIOArray, writeIOArray, unsafeReadIOArray, unsafeWriteIOArray,
31 -- Handles, file descriptors,
33 Handle(..), Handle__(..), HandleType(..), IOMode(..), FD,
34 isReadableHandleType, isWritableHandleType, isReadWriteHandleType, showHandle,
37 -- Buffer(..), RawBuffer, BufferState(..),
38 BufferList(..), BufferMode(..),
39 --bufferIsWritable, bufferEmpty, bufferFull,
42 Exception(..), ArithException(..), AsyncException(..), ArrayException(..),
43 stackOverflow, heapOverflow, ioException,
44 IOError, IOException(..), IOErrorType(..), ioError, userError,
46 throwIO, block, unblock, blocked, catchAny, catchException,
48 ErrorCall(..), AssertionFailed(..), assertError, untangle,
49 BlockedOnDeadMVar(..), BlockedIndefinitely(..), Deadlock(..),
50 blockedOnDeadMVar, blockedIndefinitely
56 import GHC.IO.Handle.Types
58 import GHC.IO.Exception
62 import Foreign.C.Types
68 -- Backwards compat: this was renamed to BlockedIndefinitelyOnMVar
69 data BlockedOnDeadMVar = BlockedOnDeadMVar
72 instance Exception BlockedOnDeadMVar
74 instance Show BlockedOnDeadMVar where
75 showsPrec _ BlockedOnDeadMVar = showString "thread blocked indefinitely"
77 blockedOnDeadMVar :: SomeException -- for the RTS
78 blockedOnDeadMVar = toException BlockedOnDeadMVar
81 -- Backwards compat: this was renamed to BlockedIndefinitelyOnSTM
82 data BlockedIndefinitely = BlockedIndefinitely
85 instance Exception BlockedIndefinitely
87 instance Show BlockedIndefinitely where
88 showsPrec _ BlockedIndefinitely = showString "thread blocked indefinitely"
90 blockedIndefinitely :: SomeException -- for the RTS
91 blockedIndefinitely = toException BlockedIndefinitely