8 | module System.Posix.Errno.Type
10 | import Derive.Finite
11 | import Derive.Prelude
14 | %language ElabReflection
21 | %runElab derive "Errno" [Show,Eq,Ord,FromInteger]
24 | public export %inline
28 | public export %inline
32 | public export %inline
36 | public export %inline
40 | public export %inline
44 | public export %inline
48 | public export %inline
52 | public export %inline
56 | public export %inline
60 | public export %inline
64 | public export %inline
68 | public export %inline
72 | public export %inline
76 | public export %inline
80 | public export %inline
84 | public export %inline
88 | public export %inline
92 | public export %inline
96 | public export %inline
100 | public export %inline
104 | public export %inline
108 | public export %inline
112 | public export %inline
116 | public export %inline
120 | public export %inline
124 | public export %inline
128 | public export %inline
132 | public export %inline
136 | public export %inline
140 | public export %inline
144 | public export %inline
148 | public export %inline
152 | public export %inline
156 | public export %inline
160 | public export %inline
164 | public export %inline
168 | public export %inline
169 | ENAMETOOLONG : Errno
172 | public export %inline
176 | public export %inline
180 | public export %inline
184 | public export %inline
188 | public export %inline
192 | public export %inline
196 | public export %inline
200 | public export %inline
204 | public export %inline
208 | public export %inline
212 | public export %inline
216 | public export %inline
220 | public export %inline
224 | public export %inline
228 | public export %inline
232 | public export %inline
236 | public export %inline
240 | public export %inline
244 | public export %inline
248 | public export %inline
249 | EDESTADDRREQ : Errno
252 | public export %inline
256 | public export %inline
260 | public export %inline
261 | ENOPROTOOPT : Errno
264 | public export %inline
265 | EPROTONOSUPPORT : Errno
266 | EPROTONOSUPPORT = 93
268 | public export %inline
269 | ESOCKTNOSUPPORT : Errno
270 | ESOCKTNOSUPPORT = 94
272 | public export %inline
276 | public export %inline
277 | EPFNOSUPPORT : Errno
280 | public export %inline
281 | EAFNOSUPPORT : Errno
284 | public export %inline
288 | public export %inline
289 | EADDRNOTAVAIL : Errno
292 | public export %inline
296 | public export %inline
297 | ENETUNREACH : Errno
300 | public export %inline
304 | public export %inline
305 | ECONNABORTED : Errno
308 | public export %inline
312 | public export %inline
316 | public export %inline
320 | public export %inline
324 | public export %inline
328 | public export %inline
329 | ETOOMANYREFS : Errno
332 | public export %inline
336 | public export %inline
337 | ECONNREFUSED : Errno
340 | public export %inline
344 | public export %inline
345 | EHOSTUNREACH : Errno
348 | public export %inline
352 | public export %inline
353 | EINPROGRESS : Errno
356 | public export %inline
360 | public export %inline
364 | public export %inline
368 | public export %inline
372 | public export %inline
373 | ENOTRECOVERABLE : Errno
374 | ENOTRECOVERABLE = 131
376 | public export %inline
380 | public export %inline
384 | public export %inline
388 | public export %inline
392 | public export %inline
396 | public export %inline
400 | public export %inline
404 | public export %inline
408 | public export %inline
412 | public export %inline
416 | public export %inline
420 | public export %inline
424 | public export %inline
428 | public export %inline
432 | public export %inline
436 | public export %inline
440 | public export %inline
444 | public export %inline
448 | public export %inline
452 | public export %inline
456 | public export %inline
460 | public export %inline
464 | public export %inline
468 | public export %inline
472 | public export %inline
476 | public export %inline
480 | public export %inline
484 | public export %inline
488 | public export %inline
492 | public export %inline
496 | public export %inline
500 | public export %inline
504 | public export %inline
508 | public export %inline
512 | public export %inline
516 | public export %inline
520 | public export %inline
524 | public export %inline
525 | EMEDIUMTYPE : Errno
528 | public export %inline
532 | public export %inline
533 | EKEYEXPIRED : Errno
536 | public export %inline
537 | EKEYREVOKED : Errno
540 | public export %inline
541 | EKEYREJECTED : Errno
544 | public export %inline
548 | public export %inline
553 | errorText : Errno -> String
554 | errorText 1 = "Operation not permitted"
555 | errorText 2 = "No such file or directory"
556 | errorText 3 = "No such process"
557 | errorText 4 = "Interrupted system call"
558 | errorText 5 = "Input/output error"
559 | errorText 6 = "No such device or address"
560 | errorText 7 = "Argument list too long"
561 | errorText 8 = "Exec format error"
562 | errorText 9 = "Bad file descriptor"
563 | errorText 10 = "No child processes"
564 | errorText 11 = "Resource temporarily unavailable"
565 | errorText 12 = "Cannot allocate memory"
566 | errorText 13 = "Permission denied"
567 | errorText 14 = "Bad address"
568 | errorText 15 = "Block device required"
569 | errorText 16 = "Device or resource busy"
570 | errorText 17 = "File exists"
571 | errorText 18 = "Invalid cross-device link"
572 | errorText 19 = "No such device"
573 | errorText 20 = "Not a directory"
574 | errorText 21 = "Is a directory"
575 | errorText 22 = "Invalid argument"
576 | errorText 23 = "Too many open files in system"
577 | errorText 24 = "Too many open files"
578 | errorText 25 = "Inappropriate ioctl for device"
579 | errorText 26 = "Text file busy"
580 | errorText 27 = "File too large"
581 | errorText 28 = "No space left on device"
582 | errorText 29 = "Illegal seek"
583 | errorText 30 = "Read-only file system"
584 | errorText 31 = "Too many links"
585 | errorText 32 = "Broken pipe"
586 | errorText 33 = "Numerical argument out of domain"
587 | errorText 34 = "Numerical result out of range"
588 | errorText 35 = "Resource deadlock avoided"
589 | errorText 36 = "File name too long"
590 | errorText 37 = "No locks available"
591 | errorText 38 = "Function not implemented"
592 | errorText 39 = "Directory not empty"
593 | errorText 40 = "Too many levels of symbolic links"
594 | errorText 42 = "No message of desired type"
595 | errorText 43 = "Identifier removed"
596 | errorText 60 = "Device not a stream"
597 | errorText 61 = "No data available"
598 | errorText 62 = "Timer expired"
599 | errorText 63 = "Out of streams resources"
600 | errorText 66 = "Object is remote"
601 | errorText 67 = "Link has been severed"
602 | errorText 71 = "Protocol error"
603 | errorText 72 = "Multihop attempted"
604 | errorText 74 = "Bad message"
605 | errorText 75 = "Value too large for defined data type"
606 | errorText 84 = "Invalid or incomplete multibyte or wide character"
607 | errorText 87 = "Too many users"
608 | errorText 88 = "Socket operation on non-socket"
609 | errorText 89 = "Destination address required"
610 | errorText 90 = "Message too long"
611 | errorText 91 = "Protocol wrong type for socket"
612 | errorText 92 = "Protocol not available"
613 | errorText 93 = "Protocol not supported"
614 | errorText 94 = "Socket type not supported"
615 | errorText 95 = "Operation not supported"
616 | errorText 96 = "Protocol family not supported"
617 | errorText 97 = "Address family not supported by protocol"
618 | errorText 98 = "Address already in use"
619 | errorText 99 = "Cannot assign requested address"
620 | errorText 100 = "Network is down"
621 | errorText 101 = "Network is unreachable"
622 | errorText 102 = "Network dropped connection on reset"
623 | errorText 103 = "Software caused connection abort"
624 | errorText 104 = "Connection reset by peer"
625 | errorText 105 = "No buffer space available"
626 | errorText 106 = "Transport endpoint is already connected"
627 | errorText 107 = "Transport endpoint is not connected"
628 | errorText 108 = "Cannot send after transport endpoint shutdown"
629 | errorText 109 = "Too many references: cannot splice"
630 | errorText 110 = "Connection timed out"
631 | errorText 111 = "Connection refused"
632 | errorText 112 = "Host is down"
633 | errorText 113 = "No route to host"
634 | errorText 114 = "Operation already in progress"
635 | errorText 115 = "Operation now in progress"
636 | errorText 116 = "Stale file handle"
637 | errorText 122 = "Disk quota exceeded"
638 | errorText 125 = "Operation canceled"
639 | errorText 130 = "Owner died"
640 | errorText 131 = "State not recoverable"
641 | errorText 44 = "Channel number out of range"
642 | errorText 45 = "Level 2 not synchronized"
643 | errorText 46 = "Level 3 halted"
644 | errorText 47 = "Level 3 reset"
645 | errorText 48 = "Link number out of range"
646 | errorText 49 = "Protocol driver not attached"
647 | errorText 50 = "No CSI structure available"
648 | errorText 51 = "Level 2 halted"
649 | errorText 52 = "Invalid exchange"
650 | errorText 53 = "Invalid request descriptor"
651 | errorText 54 = "Exchange full"
652 | errorText 55 = "No anode"
653 | errorText 56 = "Invalid request code"
654 | errorText 57 = "Invalid slot"
655 | errorText 59 = "Bad font file format"
656 | errorText 64 = "Machine is not on the network"
657 | errorText 65 = "Package not installed"
658 | errorText 68 = "Advertise error"
659 | errorText 69 = "Srmount error"
660 | errorText 70 = "Communication error on send"
661 | errorText 73 = "RFS specific error"
662 | errorText 76 = "Name not unique on network"
663 | errorText 77 = "File descriptor in bad state"
664 | errorText 78 = "Remote address changed"
665 | errorText 79 = "Can not access a needed shared library"
666 | errorText 80 = "Accessing a corrupted shared library"
667 | errorText 81 = ".lib section in a.out corrupted"
668 | errorText 82 = "Attempting to link in too many shared libraries"
669 | errorText 83 = "Cannot exec a shared library directly"
670 | errorText 85 = "Interrupted system call should be restarted"
671 | errorText 86 = "Streams pipe error"
672 | errorText 117 = "Structure needs cleaning"
673 | errorText 118 = "Not a XENIX named type file"
674 | errorText 119 = "No XENIX semaphores available"
675 | errorText 120 = "Is a named type file"
676 | errorText 121 = "Remote I/O error"
677 | errorText 123 = "No medium found"
678 | errorText 124 = "Wrong medium type"
679 | errorText 126 = "Required key not available"
680 | errorText 127 = "Key has expired"
681 | errorText 128 = "Key has been revoked"
682 | errorText 129 = "Key was rejected by service"
683 | errorText 132 = "Operation not possible due to RF-kill"
684 | errorText 133 = "Memory page has hardware error"
685 | errorText (EN x) = "Unknown error: \{show x}"
688 | errorName : Errno -> String
689 | errorName 1 = "EPERM"
690 | errorName 2 = "ENOENT"
691 | errorName 3 = "ESRCH"
692 | errorName 4 = "EINTR"
693 | errorName 5 = "EIO"
694 | errorName 6 = "ENXIO"
695 | errorName 7 = "E2BIG"
696 | errorName 8 = "ENOEXEC"
697 | errorName 9 = "EBADF"
698 | errorName 10 = "ECHILD"
699 | errorName 11 = "EAGAIN"
700 | errorName 12 = "ENOMEM"
701 | errorName 13 = "EACCES"
702 | errorName 14 = "EFAULT"
703 | errorName 15 = "ENOTBLK"
704 | errorName 16 = "EBUSY"
705 | errorName 17 = "EEXIST"
706 | errorName 18 = "EXDEV"
707 | errorName 19 = "ENODEV"
708 | errorName 20 = "ENOTDIR"
709 | errorName 21 = "EISDIR"
710 | errorName 22 = "EINVAL"
711 | errorName 23 = "ENFILE"
712 | errorName 24 = "EMFILE"
713 | errorName 25 = "ENOTTY"
714 | errorName 26 = "ETXTBSY"
715 | errorName 27 = "EFBIG"
716 | errorName 28 = "ENOSPC"
717 | errorName 29 = "ESPIPE"
718 | errorName 30 = "EROFS"
719 | errorName 31 = "EMLINK"
720 | errorName 32 = "EPIPE"
721 | errorName 33 = "EDOM"
722 | errorName 34 = "ERANGE"
723 | errorName 35 = "EDEADLK"
724 | errorName 36 = "ENAMETOOLONG"
725 | errorName 37 = "ENOLCK"
726 | errorName 38 = "ENOSYS"
727 | errorName 39 = "ENOTEMPTY"
728 | errorName 40 = "ELOOP"
729 | errorName 42 = "ENOMSG"
730 | errorName 43 = "EIDRM"
731 | errorName 60 = "ENOSTR"
732 | errorName 61 = "ENODATA"
733 | errorName 62 = "ETIME"
734 | errorName 63 = "ENOSR"
735 | errorName 66 = "EREMOTE"
736 | errorName 67 = "ENOLINK"
737 | errorName 71 = "EPROTO"
738 | errorName 72 = "EMULTIHOP"
739 | errorName 74 = "EBADMSG"
740 | errorName 75 = "EOVERFLOW"
741 | errorName 84 = "EILSEQ"
742 | errorName 87 = "EUSERS"
743 | errorName 88 = "ENOTSOCK"
744 | errorName 89 = "EDESTADDRREQ"
745 | errorName 90 = "EMSGSIZE"
746 | errorName 91 = "EPROTOTYPE"
747 | errorName 92 = "ENOPROTOOPT"
748 | errorName 93 = "EPROTONOSUPPORT"
749 | errorName 94 = "ESOCKTNOSUPPORT"
750 | errorName 95 = "EOPNOTSUPP"
751 | errorName 96 = "EPFNOSUPPORT"
752 | errorName 97 = "EAFNOSUPPORT"
753 | errorName 98 = "EADDRINUSE"
754 | errorName 99 = "EADDRNOTAVAIL"
755 | errorName 100 = "ENETDOWN"
756 | errorName 101 = "ENETUNREACH"
757 | errorName 102 = "ENETRESET"
758 | errorName 103 = "ECONNABORTED"
759 | errorName 104 = "ECONNRESET"
760 | errorName 105 = "ENOBUFS"
761 | errorName 106 = "EISCONN"
762 | errorName 107 = "ENOTCONN"
763 | errorName 108 = "ESHUTDOWN"
764 | errorName 109 = "ETOOMANYREFS"
765 | errorName 110 = "ETIMEDOUT"
766 | errorName 111 = "ECONNREFUSED"
767 | errorName 112 = "EHOSTDOWN"
768 | errorName 113 = "EHOSTUNREACH"
769 | errorName 114 = "EALREADY"
770 | errorName 115 = "EINPROGRESS"
771 | errorName 116 = "ESTALE"
772 | errorName 122 = "EDQUOT"
773 | errorName 125 = "ECANCELED"
774 | errorName 130 = "EOWNERDEAD"
775 | errorName 131 = "ENOTRECOVERABLE"
776 | errorName 44 = "ECHRNG"
777 | errorName 45 = "EL2NSYNC"
778 | errorName 46 = "EL3HLT"
779 | errorName 47 = "EL3RST"
780 | errorName 48 = "ELNRNG"
781 | errorName 49 = "EUNATCH"
782 | errorName 50 = "ENOCSI"
783 | errorName 51 = "EL2HLT"
784 | errorName 52 = "EBADE"
785 | errorName 53 = "EBADR"
786 | errorName 54 = "EXFULL"
787 | errorName 55 = "ENOANO"
788 | errorName 56 = "EBADRQC"
789 | errorName 57 = "EBADSLT"
790 | errorName 59 = "EBFONT"
791 | errorName 64 = "ENONET"
792 | errorName 65 = "ENOPKG"
793 | errorName 68 = "EADV"
794 | errorName 69 = "ESRMNT"
795 | errorName 70 = "ECOMM"
796 | errorName 73 = "EDOTDOT"
797 | errorName 76 = "ENOTUNIQ"
798 | errorName 77 = "EBADFD"
799 | errorName 78 = "EREMCHG"
800 | errorName 79 = "ELIBACC"
801 | errorName 80 = "ELIBBAD"
802 | errorName 81 = "ELIBSCN"
803 | errorName 82 = "ELIBMAX"
804 | errorName 83 = "ELIBEXEC"
805 | errorName 85 = "ERESTART"
806 | errorName 86 = "ESTRPIPE"
807 | errorName 117 = "EUCLEAN"
808 | errorName 118 = "ENOTNAM"
809 | errorName 119 = "ENAVAIL"
810 | errorName 120 = "EISNAM"
811 | errorName 121 = "EREMOTEIO"
812 | errorName 123 = "ENOMEDIUM"
813 | errorName 124 = "EMEDIUMTYPE"
814 | errorName 126 = "ENOKEY"
815 | errorName 127 = "EKEYEXPIRED"
816 | errorName 128 = "EKEYREVOKED"
817 | errorName 129 = "EKEYREJECTED"
818 | errorName 132 = "ERFKILL"
819 | errorName 133 = "EHWPOISON"
820 | errorName (EN _) = "EUNKNOWN"