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
The API of this module is unstable and not meant to be consumed by the general public.
If you absolutely must depend on it, make sure to use a tight upper
bound, e.g., base < 4.X
rather than base < 5
, because the interface can
change rapidly without much warning.
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 = 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 :: HasCallStack => 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 Source #
The thread is blocked on an MVar
, but there are no other references
to the MVar
so it can't ever continue.
Instances
Exception BlockedIndefinitelyOnMVar Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception | |
Show BlockedIndefinitelyOnMVar Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception |
data BlockedIndefinitelyOnSTM Source #
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
Exception BlockedIndefinitelyOnSTM Source # | @since base-4.1.0.0 |
Show BlockedIndefinitelyOnSTM Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception |
There are no runnable threads, so the program is deadlocked.
The Deadlock
exception is raised in the main thread only.
Instances
Exception Deadlock Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception toException :: Deadlock -> SomeException Source # fromException :: SomeException -> Maybe Deadlock Source # displayException :: Deadlock -> String Source # backtraceDesired :: Deadlock -> Bool Source # | |
Show Deadlock Source # | @since base-4.1.0.0 |
data AllocationLimitExceeded Source #
This thread has exceeded its allocation limit. See
setAllocationCounter
and
enableAllocationLimit
.
@since base-4.8.0.0
Instances
Exception AllocationLimitExceeded Source # | @since base-4.8.0.0 |
Show AllocationLimitExceeded Source # | @since base-4.7.1.0 |
Defined in GHC.Internal.IO.Exception |
newtype AssertionFailed Source #
Instances
Exception AssertionFailed Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception | |
Show AssertionFailed Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception |
newtype CompactionFailed Source #
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
Exception CompactionFailed Source # | @since base-4.10.0.0 |
Show CompactionFailed Source # | @since base-4.10.0.0 |
Defined in GHC.Internal.IO.Exception |
data SomeAsyncException Source #
Superclass for asynchronous exceptions.
@since base-4.7.0.0
Exception e => SomeAsyncException e |
Instances
Exception SomeAsyncException Source # | @since base-4.7.0.0 |
Show SomeAsyncException Source # | @since base-4.7.0.0 |
Defined in GHC.Internal.IO.Exception |
asyncExceptionToException :: Exception e => e -> SomeException Source #
@since base-4.7.0.0
asyncExceptionFromException :: Exception e => SomeException -> Maybe e Source #
@since base-4.7.0.0
data AsyncException Source #
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
Exception AsyncException Source # | @since base-4.7.0.0 |
Defined in GHC.Internal.IO.Exception | |
Show AsyncException Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception | |
Eq AsyncException Source # | @since base-4.2.0.0 |
Defined in GHC.Internal.IO.Exception (==) :: AsyncException -> AsyncException -> Bool Source # (/=) :: AsyncException -> AsyncException -> Bool Source # | |
Ord AsyncException Source # | @since base-4.2.0.0 |
Defined in GHC.Internal.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 # |
data ArrayException Source #
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
Exception ArrayException Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception | |
Show ArrayException Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception | |
Eq ArrayException Source # | @since base-4.2.0.0 |
Defined in GHC.Internal.IO.Exception (==) :: ArrayException -> ArrayException -> Bool Source # (/=) :: ArrayException -> ArrayException -> Bool Source # | |
Ord ArrayException Source # | @since base-4.2.0.0 |
Defined in GHC.Internal.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 # |
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
data FixIOException Source #
The exception thrown when an infinite cycle is detected in
fixIO
.
@since base-4.11.0.0
Instances
Exception FixIOException Source # | @since base-4.11.0.0 |
Defined in GHC.Internal.IO.Exception | |
Show FixIOException Source # | @since base-4.11.0.0 |
Defined in GHC.Internal.IO.Exception |
ioException :: HasCallStack => IOException -> IO a Source #
type IOError = IOException Source #
data IOException Source #
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
Exception IOException Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception | |
Show IOException Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception | |
Eq IOException Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception (==) :: IOException -> IOException -> Bool Source # (/=) :: IOException -> IOException -> Bool Source # |
data IOErrorType Source #
An abstract type that contains a value for each variant of IOError
.
AlreadyExists | |
NoSuchThing | |
ResourceBusy | |
ResourceExhausted | |
EOF | |
IllegalOperation | |
PermissionDenied | |
UserError | |
UnsatisfiedConstraints | |
SystemError | |
ProtocolError | |
OtherError | |
InvalidArgument | |
InappropriateType | |
HardwareFault | |
UnsupportedOperation | |
TimeExpired | |
ResourceVanished | |
Interrupted |
Instances
Show IOErrorType Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception | |
Eq IOErrorType Source # | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception (==) :: IOErrorType -> IOErrorType -> Bool Source # (/=) :: IOErrorType -> IOErrorType -> Bool Source # |
assertError :: (?callStack :: CallStack) => Bool -> a -> a Source #