Copyright | (c) The University of Glasgow 2009 |
---|---|
License | see libraries/base/LICENSE |
Maintainer | libraries@haskell.org |
Stability | internal |
Portability | non-portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
IO-related Exception types and functions
Synopsis
- data BlockedIndefinitelyOnMVar = BlockedIndefinitelyOnMVar
- blockedIndefinitelyOnMVar :: SomeException
- data BlockedIndefinitelyOnSTM = BlockedIndefinitelyOnSTM
- blockedIndefinitelyOnSTM :: SomeException
- data Deadlock = Deadlock
- data AllocationLimitExceeded = AllocationLimitExceeded
- allocationLimitExceeded :: SomeException
- newtype AssertionFailed = AssertionFailed String
- newtype CompactionFailed = CompactionFailed String
- cannotCompactFunction :: SomeException
- cannotCompactPinned :: SomeException
- cannotCompactMutable :: SomeException
- data SomeAsyncException = forall e.Exception e => SomeAsyncException e
- asyncExceptionToException :: Exception e => e -> SomeException
- asyncExceptionFromException :: Exception e => SomeException -> Maybe e
- data AsyncException
- stackOverflow :: SomeException
- heapOverflow :: SomeException
- data ArrayException
- data ExitCode
- data FixIOException = FixIOException
- ioException :: IOException -> IO a
- ioError :: IOError -> IO a
- type IOError = IOException
- data IOException = IOError {}
- data IOErrorType
- userError :: String -> IOError
- assertError :: (?callStack :: CallStack) => Bool -> a -> a
- unsupportedOperation :: IOError
- untangle :: Addr# -> String -> String
Documentation
data BlockedIndefinitelyOnMVar #
The thread is blocked on an MVar
, but there are no other references
to the MVar
so it can't ever continue.
Instances
Show BlockedIndefinitelyOnMVar # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> BlockedIndefinitelyOnMVar -> ShowS # show :: BlockedIndefinitelyOnMVar -> String # showList :: [BlockedIndefinitelyOnMVar] -> ShowS # | |
Exception BlockedIndefinitelyOnMVar # | Since: base-4.1.0.0 |
data BlockedIndefinitelyOnSTM #
The thread is waiting to retry an STM transaction, but there are no
other references to any TVar
s involved, so it can't ever continue.
Instances
Show BlockedIndefinitelyOnSTM # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> BlockedIndefinitelyOnSTM -> ShowS # show :: BlockedIndefinitelyOnSTM -> String # showList :: [BlockedIndefinitelyOnSTM] -> ShowS # | |
Exception BlockedIndefinitelyOnSTM # | Since: base-4.1.0.0 |
There are no runnable threads, so the program is deadlocked.
The Deadlock
exception is raised in the main thread only.
Instances
Show Deadlock # | Since: base-4.1.0.0 |
Exception Deadlock # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception toException :: Deadlock -> SomeException # fromException :: SomeException -> Maybe Deadlock # displayException :: Deadlock -> String # |
data AllocationLimitExceeded #
This thread has exceeded its allocation limit. See
setAllocationCounter
and
enableAllocationLimit
.
Since: base-4.8.0.0
Instances
Show AllocationLimitExceeded # | Since: base-4.7.1.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> AllocationLimitExceeded -> ShowS # show :: AllocationLimitExceeded -> String # showList :: [AllocationLimitExceeded] -> ShowS # | |
Exception AllocationLimitExceeded # | Since: base-4.8.0.0 |
newtype AssertionFailed #
Instances
Show AssertionFailed # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> AssertionFailed -> ShowS # show :: AssertionFailed -> String # showList :: [AssertionFailed] -> ShowS # | |
Exception AssertionFailed # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception |
newtype CompactionFailed #
Compaction found an object that cannot be compacted. Functions
cannot be compacted, nor can mutable objects or pinned objects.
See compact
.
Since: base-4.10.0.0
Instances
Show CompactionFailed # | Since: base-4.10.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> CompactionFailed -> ShowS # show :: CompactionFailed -> String # showList :: [CompactionFailed] -> ShowS # | |
Exception CompactionFailed # | Since: base-4.10.0.0 |
Defined in GHC.IO.Exception |
data SomeAsyncException #
Superclass for asynchronous exceptions.
Since: base-4.7.0.0
forall e.Exception e => SomeAsyncException e |
Instances
Show SomeAsyncException # | Since: base-4.7.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> SomeAsyncException -> ShowS # show :: SomeAsyncException -> String # showList :: [SomeAsyncException] -> ShowS # | |
Exception SomeAsyncException # | Since: base-4.7.0.0 |
Defined in GHC.IO.Exception |
asyncExceptionToException :: Exception e => e -> SomeException #
Since: base-4.7.0.0
asyncExceptionFromException :: Exception e => SomeException -> Maybe e #
Since: base-4.7.0.0
data AsyncException #
Asynchronous exceptions.
StackOverflow | The current thread's stack exceeded its limit. Since an exception has been raised, the thread's stack will certainly be below its limit again, but the programmer should take remedial action immediately. |
HeapOverflow | The program's heap is reaching its limit, and the program should take action to reduce the amount of live data it has. Notes:
|
ThreadKilled | This exception is raised by another thread
calling |
UserInterrupt | This exception is raised by default in the main thread of the program when the user requests to terminate the program via the usual mechanism(s) (e.g. Control-C in the console). |
Instances
Eq AsyncException # | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception (==) :: AsyncException -> AsyncException -> Bool Source # (/=) :: AsyncException -> AsyncException -> Bool Source # | |
Ord AsyncException # | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception compare :: AsyncException -> AsyncException -> Ordering Source # (<) :: AsyncException -> AsyncException -> Bool Source # (<=) :: AsyncException -> AsyncException -> Bool Source # (>) :: AsyncException -> AsyncException -> Bool Source # (>=) :: AsyncException -> AsyncException -> Bool Source # max :: AsyncException -> AsyncException -> AsyncException Source # min :: AsyncException -> AsyncException -> AsyncException Source # | |
Show AsyncException # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> AsyncException -> ShowS # show :: AsyncException -> String # showList :: [AsyncException] -> ShowS # | |
Exception AsyncException # | Since: base-4.7.0.0 |
Defined in GHC.IO.Exception |
data ArrayException #
Exceptions generated by array operations
IndexOutOfBounds String | An attempt was made to index an array outside its declared bounds. |
UndefinedElement String | An attempt was made to evaluate an element of an array that had not been initialized. |
Instances
Eq ArrayException # | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception (==) :: ArrayException -> ArrayException -> Bool Source # (/=) :: ArrayException -> ArrayException -> Bool Source # | |
Ord ArrayException # | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception compare :: ArrayException -> ArrayException -> Ordering Source # (<) :: ArrayException -> ArrayException -> Bool Source # (<=) :: ArrayException -> ArrayException -> Bool Source # (>) :: ArrayException -> ArrayException -> Bool Source # (>=) :: ArrayException -> ArrayException -> Bool Source # max :: ArrayException -> ArrayException -> ArrayException Source # min :: ArrayException -> ArrayException -> ArrayException Source # | |
Show ArrayException # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> ArrayException -> ShowS # show :: ArrayException -> String # showList :: [ArrayException] -> ShowS # | |
Exception ArrayException # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception |
Defines the exit codes that a program can return.
ExitSuccess | indicates successful termination; |
ExitFailure Int | indicates program failure with an exit code. The exact interpretation of the code is operating-system dependent. In particular, some values may be prohibited (e.g. 0 on a POSIX-compliant system). |
Instances
Eq ExitCode # | |
Ord ExitCode # | |
Defined in GHC.IO.Exception | |
Read ExitCode # | |
Show ExitCode # | |
Generic ExitCode # | |
Exception ExitCode # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception toException :: ExitCode -> SomeException # fromException :: SomeException -> Maybe ExitCode # displayException :: ExitCode -> String # | |
type Rep ExitCode # | |
Defined in GHC.IO.Exception type Rep ExitCode = D1 ('MetaData "ExitCode" "GHC.IO.Exception" "base" 'False) (C1 ('MetaCons "ExitSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExitFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) |
data FixIOException #
The exception thrown when an infinite cycle is detected in
fixIO
.
Since: base-4.11.0.0
Instances
Show FixIOException # | Since: base-4.11.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> FixIOException -> ShowS # show :: FixIOException -> String # showList :: [FixIOException] -> ShowS # | |
Exception FixIOException # | Since: base-4.11.0.0 |
Defined in GHC.IO.Exception |
ioException :: IOException -> IO a #
type IOError = IOException #
data IOException #
Exceptions that occur in the IO
monad.
An IOException
records a more specific error type, a descriptive
string and maybe the handle that was used when the error was
flagged.
IOError | |
|
Instances
Eq IOException # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception (==) :: IOException -> IOException -> Bool Source # (/=) :: IOException -> IOException -> Bool Source # | |
Show IOException # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> IOException -> ShowS # show :: IOException -> String # showList :: [IOException] -> ShowS # | |
Exception IOException # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception |
data IOErrorType #
An abstract type that contains a value for each variant of IOError
.
Instances
Eq IOErrorType # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception (==) :: IOErrorType -> IOErrorType -> Bool Source # (/=) :: IOErrorType -> IOErrorType -> Bool Source # | |
Show IOErrorType # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception showsPrec :: Int -> IOErrorType -> ShowS # show :: IOErrorType -> String # showList :: [IOErrorType] -> ShowS # |
assertError :: (?callStack :: CallStack) => Bool -> a -> a #