Bump base lower version to 4.5 (the version GHC 7.4.1 came with)
[packages/unix.git] / tests / signals001.hs
1 import System.Posix.Signals
2
3 #include "ghcconfig.h"
4
5 main = do
6 print (testMembers emptySignalSet)
7 print (testMembers emptyset)
8 print (testMembers fullSignalSet)
9 print (testMembers fullset)
10
11 fullset = internalAbort `addSignal`
12 realTimeAlarm `addSignal`
13 busError `addSignal`
14 processStatusChanged `addSignal`
15 continueProcess `addSignal`
16 floatingPointException `addSignal`
17 lostConnection `addSignal`
18 illegalInstruction `addSignal`
19 keyboardSignal `addSignal`
20 killProcess `addSignal`
21 openEndedPipe `addSignal`
22 keyboardTermination `addSignal`
23 segmentationViolation `addSignal`
24 softwareStop `addSignal`
25 softwareTermination `addSignal`
26 keyboardStop `addSignal`
27 backgroundRead `addSignal`
28 backgroundWrite `addSignal`
29 userDefinedSignal1 `addSignal`
30 userDefinedSignal2 `addSignal`
31 #if HAVE_SIGPOLL
32 pollableEvent `addSignal`
33 #endif
34 profilingTimerExpired `addSignal`
35 badSystemCall `addSignal`
36 breakpointTrap `addSignal`
37 urgentDataAvailable `addSignal`
38 virtualTimerExpired `addSignal`
39 cpuTimeLimitExceeded `addSignal`
40 fileSizeLimitExceeded `addSignal`
41 emptySignalSet
42
43 emptyset = internalAbort `deleteSignal`
44 realTimeAlarm `deleteSignal`
45 busError `deleteSignal`
46 processStatusChanged `deleteSignal`
47 continueProcess `deleteSignal`
48 floatingPointException `deleteSignal`
49 lostConnection `deleteSignal`
50 illegalInstruction `deleteSignal`
51 keyboardSignal `deleteSignal`
52 killProcess `deleteSignal`
53 openEndedPipe `deleteSignal`
54 keyboardTermination `deleteSignal`
55 segmentationViolation `deleteSignal`
56 softwareStop `deleteSignal`
57 softwareTermination `deleteSignal`
58 keyboardStop `deleteSignal`
59 backgroundRead `deleteSignal`
60 backgroundWrite `deleteSignal`
61 userDefinedSignal1 `deleteSignal`
62 userDefinedSignal2 `deleteSignal`
63 #if HAVE_SIGPOLL
64 pollableEvent `deleteSignal`
65 #endif
66 profilingTimerExpired `deleteSignal`
67 badSystemCall `deleteSignal`
68 breakpointTrap `deleteSignal`
69 urgentDataAvailable `deleteSignal`
70 virtualTimerExpired `deleteSignal`
71 cpuTimeLimitExceeded `deleteSignal`
72 fileSizeLimitExceeded `deleteSignal`
73 fullSignalSet
74
75 testMembers set = [
76 internalAbort `inSignalSet` set,
77 realTimeAlarm `inSignalSet` set,
78 busError `inSignalSet` set,
79 processStatusChanged `inSignalSet` set,
80 continueProcess `inSignalSet` set,
81 floatingPointException `inSignalSet` set,
82 lostConnection `inSignalSet` set,
83 illegalInstruction `inSignalSet` set,
84 keyboardSignal `inSignalSet` set,
85 killProcess `inSignalSet` set,
86 openEndedPipe `inSignalSet` set,
87 keyboardTermination `inSignalSet` set,
88 segmentationViolation `inSignalSet` set,
89 softwareStop `inSignalSet` set,
90 softwareTermination `inSignalSet` set,
91 keyboardStop `inSignalSet` set,
92 backgroundRead `inSignalSet` set,
93 backgroundWrite `inSignalSet` set,
94 userDefinedSignal1 `inSignalSet` set,
95 userDefinedSignal2 `inSignalSet` set,
96 #if HAVE_SIGPOLL
97 pollableEvent `inSignalSet` set,
98 #endif
99 profilingTimerExpired `inSignalSet` set,
100 badSystemCall `inSignalSet` set,
101 breakpointTrap `inSignalSet` set,
102 urgentDataAvailable `inSignalSet` set,
103 virtualTimerExpired `inSignalSet` set,
104 cpuTimeLimitExceeded `inSignalSet` set,
105 fileSizeLimitExceeded `inSignalSet` set
106 ]