2 % (c) The GRASP/AQUA Project, Glasgow University, 1995-1996
4 \section[PosixErr]{Haskell 1.3 POSIX Error Codes}
14 getErrorCode :: IO ErrorCode
16 errno <- _casm_ ``%r = errno;''
19 setErrorCode :: ErrorCode -> IO ()
20 setErrorCode errno = do
21 _casm_ ``errno = %0;'' errno
27 argumentListTooLong, e2BIG :: ErrorCode
28 argumentListTooLong = ``E2BIG''
31 badFd, eBADF :: ErrorCode
35 brokenPipe, ePIPE :: ErrorCode
36 brokenPipe = ``EPIPE''
39 directoryNotEmpty, eNOTEMPTY :: ErrorCode
40 directoryNotEmpty = ``ENOTEMPTY''
41 eNOTEMPTY = ``ENOTEMPTY''
43 execFormatError, eNOEXEC :: ErrorCode
44 execFormatError = ``ENOEXEC''
47 fileAlreadyExists, eEXIST :: ErrorCode
48 fileAlreadyExists = ``EEXIST''
51 fileTooLarge, eFBIG :: ErrorCode
52 fileTooLarge = ``EFBIG''
55 filenameTooLong, eNAMETOOLONG :: ErrorCode
56 filenameTooLong = ``ENAMETOOLONG''
57 eNAMETOOLONG = ``ENAMETOOLONG''
59 improperLink, eXDEV :: ErrorCode
60 improperLink = ``EXDEV''
63 inappropriateIOControlOperation, eNOTTY :: ErrorCode
64 inappropriateIOControlOperation = ``ENOTTY''
67 inputOutputError, eIO :: ErrorCode
68 inputOutputError = ``EIO''
71 interruptedOperation, eINTR :: ErrorCode
72 interruptedOperation = ``EINTR''
75 invalidArgument, eINVAL :: ErrorCode
76 invalidArgument = ``EINVAL''
79 invalidSeek, eSPIPE :: ErrorCode
80 invalidSeek = ``ESPIPE''
83 isADirectory, eISDIR :: ErrorCode
84 isADirectory = ``EISDIR''
87 noChildProcess, eCHILD :: ErrorCode
88 noChildProcess = ``ECHILD''
91 noLocksAvailable, eNOLCK :: ErrorCode
92 noLocksAvailable = ``ENOLCK''
95 noSpaceLeftOnDevice, eNOSPC :: ErrorCode
96 noSpaceLeftOnDevice = ``ENOSPC''
99 noSuchOperationOnDevice, eNODEV :: ErrorCode
100 noSuchOperationOnDevice = ``ENODEV''
103 noSuchDeviceOrAddress, eNXIO :: ErrorCode
104 noSuchDeviceOrAddress = ``ENXIO''
107 noSuchFileOrDirectory, eNOENT :: ErrorCode
108 noSuchFileOrDirectory = ``ENOENT''
111 noSuchProcess, eSRCH :: ErrorCode
112 noSuchProcess = ``ESRCH''
115 notADirectory, eNOTDIR :: ErrorCode
116 notADirectory = ``ENOTDIR''
117 eNOTDIR = ``ENOTDIR''
119 notEnoughMemory, eNOMEM :: ErrorCode
120 notEnoughMemory = ``ENOMEM''
123 operationNotImplemented, eNOSYS :: ErrorCode
124 operationNotImplemented = ``ENOSYS''
127 operationNotPermitted, ePERM :: ErrorCode
128 operationNotPermitted = ``EPERM''
131 permissionDenied, eACCES :: ErrorCode
132 permissionDenied = ``EACCES''
135 readOnlyFileSystem, eROFS :: ErrorCode
136 readOnlyFileSystem = ``EROFS''
139 resourceBusy, eBUSY :: ErrorCode
140 resourceBusy = ``EBUSY''
143 resourceDeadlockAvoided, eDEADLK :: ErrorCode
144 resourceDeadlockAvoided = ``EDEADLK''
145 eDEADLK = ``EDEADLK''
147 resourceTemporarilyUnavailable, eAGAIN :: ErrorCode
148 resourceTemporarilyUnavailable = ``EAGAIN''
151 tooManyLinks, eMLINK :: ErrorCode
152 tooManyLinks = ``EMLINK''
155 tooManyOpenFiles, eMFILE :: ErrorCode
156 tooManyOpenFiles = ``EMFILE''
159 tooManyOpenFilesInSystem, eNFILE :: ErrorCode
160 tooManyOpenFilesInSystem = ``ENFILE''