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