Haskell representation for errno values.
The implementation is deliberately exposed, to allow users to add
their own definitions of Errno values.
Moduleghc-internal-9.1003.0Haskell2010
GHC.Internal.Foreign.C.Error
C-specific Marshalling support: Handling of C "errno" error codes.
- 1 type
- 126 values
- Packageghc-internal-9.1003.0
- Exports127
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceError.hs
Haskell representations of errno values
1 declarationCommon errno symbols
Different operating systems and/or C libraries often support
different values of errno. This module defines the common values,
but due to the open definition of Errno users may add definitions
which are not predefined.
Errno functions
Get the current value of errno in the current thread.
On GHC, the runtime will ensure that any Haskell thread will only see "its own"
errno, by saving and restoring the value when Haskell threads are scheduled
across OS threads.
Reset the current thread's errno value to eOK.
errnoToIOError Guards for IO operations that may fail
throwErrnoIf as throwErrnoIf, but discards the result of the IO action after error handling.
as throwErrnoIf, but retry the IO action when it yields the error code eINTR - this amounts to the standard retry loop for interrupted POSIX system calls.
as throwErrnoIfRetry, but discards the result.
as throwErrnoIfMinus1, but discards the result.
as throwErrnoIfMinus1, but discards the result.
as throwErrnoIfRetry, but additionally if the operation yields the error code eAGAIN or eWOULDBLOCK, an alternative action is executed before retrying.
as throwErrnoIfRetryMayBlock, but discards the result.
as throwErrnoIfMinus1Retry, but checks for operations that would block.
as throwErrnoIfMinus1RetryMayBlock, but discards the result.
as throwErrnoIfNullRetry, but checks for operations that would block.
as throwErrno, but exceptions include the given path when appropriate.
as throwErrnoIf, but exceptions include the given path when appropriate.
as throwErrnoIf_, but exceptions include the given path when appropriate.
as throwErrnoIfNull, but exceptions include the given path when appropriate.
as throwErrnoIfMinus1, but exceptions include the given path when appropriate.
as throwErrnoIfMinus1_, but exceptions include the given path when appropriate.