Haskell representation for errno values.
The implementation is deliberately exposed, to allow users to add
their own definitions of Errno values.
Moduleghc-internal-10.0.0Haskell2010
GHC.Internal.Foreign.C.Error
C-specific Marshalling support: Handling of C "errno" error codes.
Contents
Synopsis
- newtype Errno
- value eOK
- value e2BIG
- value eACCES
- value eADDRINUSE
- value eADDRNOTAVAIL
- value eADV
- value eAFNOSUPPORT
- value eAGAIN
- value eALREADY
- value eBADF
- value eBADMSG
- value eBADRPC
- value eBUSY
- value eCHILD
- value eCOMM
- value eCONNABORTED
- value eCONNREFUSED
- value eCONNRESET
- value eDEADLK
- value eDESTADDRREQ
- value eDIRTY
- value eDOM
- value eDQUOT
- value eEXIST
- value eFAULT
- value eFBIG
- value eFTYPE
- value eHOSTDOWN
- value eHOSTUNREACH
- value eIDRM
- value eILSEQ
- value eINPROGRESS
- value eINTR
- value eINVAL
- value eIO
- value eISCONN
- value eISDIR
- value eLOOP
- value eMFILE
- value eMLINK
- value eMSGSIZE
- value eMULTIHOP
- value eNAMETOOLONG
- value eNETDOWN
- value eNETRESET
- value eNETUNREACH
- value eNFILE
- value eNOBUFS
- value eNODATA
- value eNODEV
- value eNOENT
- value eNOEXEC
- value eNOLCK
- value eNOLINK
- value eNOMEM
- value eNOMSG
- value eNONET
- value eNOPROTOOPT
- value eNOSPC
- value eNOSR
- value eNOSTR
- value eNOSYS
- value eNOTBLK
- value eNOTCONN
- value eNOTDIR
- value eNOTEMPTY
- value eNOTSOCK
- value eNOTSUP
- value eNOTTY
- value eNXIO
- value eOPNOTSUPP
- value ePERM
- value ePFNOSUPPORT
- value ePIPE
- value ePROCLIM
- value ePROCUNAVAIL
- value ePROGMISMATCH
- value ePROGUNAVAIL
- value ePROTO
- value ePROTONOSUPPORT
- value ePROTOTYPE
- value eRANGE
- value eREMCHG
- value eREMOTE
- value eROFS
- value eRPCMISMATCH
- value eRREMOTE
- value eSHUTDOWN
- value eSOCKTNOSUPPORT
- value eSPIPE
- value eSRCH
- value eSRMNT
- value eSTALE
- value eTIME
- value eTIMEDOUT
- value eTOOMANYREFS
- value eTXTBSY
- value eUSERS
- value eWOULDBLOCK
- value eXDEV
- value isValidErrno
- value getErrno
- value resetErrno
- value errnoToIOError
- value throwErrno
- value throwErrnoIf
- value throwErrnoIf_
- value throwErrnoIfRetry
- value throwErrnoIfRetry_
- value throwErrnoIfMinus1
- value throwErrnoIfMinus1_
- value throwErrnoIfMinus1Retry
- value throwErrnoIfMinus1Retry_
- value throwErrnoIfNull
- value throwErrnoIfNullRetry
- value throwErrnoIfRetryMayBlock
- value throwErrnoIfRetryMayBlock_
- value throwErrnoIfMinus1RetryMayBlock
- value throwErrnoIfMinus1RetryMayBlock_
- value throwErrnoIfNullRetryMayBlock
- value throwErrnoPath
- value throwErrnoPathIf
- value throwErrnoPathIf_
- value throwErrnoPathIfNull
- value throwErrnoPathIfMinus1
- value throwErrnoPathIfMinus1_
- Packageghc-internal-10.0.0
- Exports127
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceError.hs
Haskell representations of errno values
Common 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.