A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://hackage.haskell.org/packages/archive/base/4.5.0.0/doc/html/Foreign-C-Error.html below:

Foreign.C.Error

Haskell representations of errno values

newtype Errno Source

Haskell representation for errno values. The implementation is deliberately exposed, to allow users to add their own definitions 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.

eOK, eXDEV, eWOULDBLOCK, eUSERS, eTXTBSY, eTOOMANYREFS, eTIMEDOUT, eTIME, eSTALE, eSRMNT, eSRCH, eSPIPE, eSOCKTNOSUPPORT, eSHUTDOWN, eRREMOTE, eRPCMISMATCH, eROFS, eREMOTE, eREMCHG, eRANGE, ePROTOTYPE, ePROTONOSUPPORT, ePROTO, ePROGUNAVAIL, ePROGMISMATCH, ePROCUNAVAIL, ePROCLIM, ePIPE, ePFNOSUPPORT, ePERM, eOPNOTSUPP, eNXIO, eNOTTY, eNOTSOCK, eNOTEMPTY, eNOTDIR, eNOTCONN, eNOTBLK, eNOSYS, eNOSTR, eNOSR, eNOSPC, eNOPROTOOPT, eNONET, eNOMSG, eNOMEM, eNOLINK, eNOLCK, eNOEXEC, eNOENT, eNODEV, eNODATA, eNOBUFS, eNFILE, eNETUNREACH, eNETRESET, eNETDOWN, eNAMETOOLONG, eMULTIHOP, eMSGSIZE, eMLINK, eMFILE, eLOOP, eISDIR, eISCONN, eIO, eINVAL, eINTR, eINPROGRESS, eILSEQ, eIDRM, eHOSTUNREACH, eHOSTDOWN, eFTYPE, eFBIG, eFAULT, eEXIST, eDQUOT, eDOM, eDIRTY, eDESTADDRREQ, eDEADLK, eCONNRESET, eCONNREFUSED, eCONNABORTED, eCOMM, eCHILD, eBUSY, eBADRPC, eBADMSG, eBADF, eALREADY, eAGAIN, eAFNOSUPPORT, eADV, eADDRNOTAVAIL, eADDRINUSE, eACCES, e2BIG :: ErrnoSource

Errno functions

errnoToIOErrorSource

Arguments

:: String

the location where the error occurred

-> Errno

the error number

-> Maybe Handle

optional handle associated with the error

-> Maybe String

optional filename associated with the error

-> IOError  

Construct an IOError based on the given Errno value. The optional information can be used to improve the accuracy of error messages.

Guards for IO operations that may fail

throwErrnoIfSource

Arguments

:: (a -> Bool)

predicate to apply to the result value of the IO operation

-> String

textual description of the location

-> IO a

the IO operation to be executed

-> IO a  

Throw an IOError corresponding to the current value of getErrno if the result value of the IO action meets the given predicate.

throwErrnoIfRetryMayBlockSource

Arguments

:: (a -> Bool)

predicate to apply to the result value of the IO operation

-> String

textual description of the location

-> IO a

the IO operation to be executed

-> IO b

action to execute before retrying if an immediate retry would block

-> IO a  

as throwErrnoIfRetry, but additionally if the operation yields the error code eAGAIN or eWOULDBLOCK, an alternative action is executed before retrying.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4