1 {-# GHC_PRAGMA INTERFACE VERSION 6 #-}
2 interface LibPosixProcPrim where
3 import LibSystem(ExitCode)
4 import PreludeArray(_ByteArray)
5 import PreludeIOError(IOError13)
6 import PreludeMonadicIO(Either)
7 import PreludeStdIO(Maybe)
8 data ExitCode {-# GHC_PRAGMA ExitSuccess | ExitFailure Int #-}
9 data Handler = Default | Ignore | Catch (_State _RealWorld -> (Either IOError13 (), _State _RealWorld))
10 data ProcessStatus = Exited ExitCode | Terminated Int | Stopped Int
12 type SignalSet = _ByteArray ()
13 addSignal :: Int -> _ByteArray () -> _ByteArray ()
14 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(AP)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
15 awaitSignal :: Maybe (_ByteArray ()) -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
16 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "SU(P)" {_A_ 2 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_ #-}
18 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
19 backgroundWrite :: Int
20 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
21 blockSignals :: _ByteArray () -> _State _RealWorld -> (Either IOError13 (_ByteArray ()), _State _RealWorld)
22 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _N_ _N_ _N_ #-}
23 continueProcess :: Int
24 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
25 deleteSignal :: Int -> _ByteArray () -> _ByteArray ()
26 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(AP)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
27 emptySignalSet :: _ByteArray ()
28 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
29 executeFile :: [Char] -> Bool -> [[Char]] -> Maybe [([Char], [Char])] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
30 {-# GHC_PRAGMA _A_ 5 _U_ 21212 _N_ _S_ "SELSL" _N_ _N_ #-}
31 exitImmediately :: ExitCode -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
32 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "SU(P)" {_A_ 2 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_ #-}
33 floatingPointException :: Int
34 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
35 forkProcess :: _State _RealWorld -> (Either IOError13 (Maybe Int), _State _RealWorld)
36 {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
37 fullSignalSet :: _ByteArray ()
38 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
39 getAnyProcessStatus :: Bool -> Bool -> _State _RealWorld -> (Either IOError13 (Maybe (Int, ProcessStatus)), _State _RealWorld)
40 {-# GHC_PRAGMA _A_ 3 _U_ 222 _N_ _S_ "EEL" _N_ _N_ #-}
41 getEnvVar :: [Char] -> _State _RealWorld -> (Either IOError13 [Char], _State _RealWorld)
42 {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "SL" _N_ _N_ #-}
43 getEnvironment :: _State _RealWorld -> (Either IOError13 [([Char], [Char])], _State _RealWorld)
44 {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
45 getGroupProcessStatus :: Bool -> Bool -> Int -> _State _RealWorld -> (Either IOError13 (Maybe (Int, ProcessStatus)), _State _RealWorld)
46 {-# GHC_PRAGMA _A_ 4 _U_ 1111 _N_ _S_ "EEU(P)U(P)" {_A_ 4 _U_ 1122 _N_ _N_ _N_ _N_} _N_ _N_ #-}
47 getPendingSignals :: _State _RealWorld -> (Either IOError13 (_ByteArray ()), _State _RealWorld)
48 {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
49 getProcessStatus :: Bool -> Bool -> Int -> _State _RealWorld -> (Either IOError13 (Maybe ProcessStatus), _State _RealWorld)
50 {-# GHC_PRAGMA _A_ 4 _U_ 1111 _N_ _S_ "EEU(P)U(P)" {_A_ 4 _U_ 1122 _N_ _N_ _N_ _N_} _N_ _N_ #-}
51 getSignalMask :: _State _RealWorld -> (Either IOError13 (_ByteArray ()), _State _RealWorld)
52 {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
53 illegalInstruction :: Int
54 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
55 inSignalSet :: Int -> _ByteArray () -> Bool
56 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(AP)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
57 installHandler :: Int -> Handler -> Maybe (_ByteArray ()) -> _State _RealWorld -> (Either IOError13 Handler, _State _RealWorld)
58 {-# GHC_PRAGMA _A_ 4 _U_ 1111 _N_ _S_ "U(P)SSU(P)" {_A_ 4 _U_ 2112 _N_ _N_ _N_ _N_} _N_ _N_ #-}
60 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
62 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
64 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
65 keyboardTermination :: Int
66 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
68 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
70 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
72 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 2 _!_ I# [] [0#] _N_ #-}
74 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
75 processStatusChanged :: Int
76 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
77 queryStoppedChildFlag :: _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
78 {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "U(P)" {_A_ 1 _U_ 2 _N_ _N_ _N_ _N_} _N_ _N_ #-}
79 raiseSignal :: Int -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
80 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "LU(P)" {_A_ 2 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_ #-}
82 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
83 removeEnvVar :: [Char] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
84 {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "SL" _N_ _N_ #-}
85 scheduleAlarm :: Int -> _State _RealWorld -> (Either IOError13 Int, _State _RealWorld)
86 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
87 segmentationViolation :: Int
88 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
89 setEnvVar :: [Char] -> [Char] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
90 {-# GHC_PRAGMA _A_ 3 _U_ 222 _N_ _S_ "SLL" _N_ _N_ #-}
91 setEnvironment :: [([Char], [Char])] -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
92 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "SU(P)" {_A_ 2 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_ #-}
93 setSignalMask :: _ByteArray () -> _State _RealWorld -> (Either IOError13 (_ByteArray ()), _State _RealWorld)
94 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _N_ _N_ _N_ #-}
95 setStoppedChildFlag :: Bool -> _State _RealWorld -> (Either IOError13 Bool, _State _RealWorld)
96 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "EU(P)" {_A_ 2 _U_ 12 _N_ _N_ _N_ _N_} _N_ _N_ #-}
98 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
100 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
102 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
104 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
106 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
108 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
110 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
112 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
114 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
116 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
117 sigProcMask :: [Char] -> Int -> _ByteArray () -> _State _RealWorld -> (Either IOError13 (_ByteArray ()), _State _RealWorld)
118 {-# GHC_PRAGMA _A_ 4 _U_ 2111 _N_ _S_ "LU(P)U(AP)U(P)" {_A_ 4 _U_ 2222 _N_ _N_ _N_ _N_} _N_ _N_ #-}
120 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
122 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
124 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
126 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
128 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
130 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
132 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
134 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
136 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
138 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
139 signalProcess :: Int -> Int -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
140 {-# GHC_PRAGMA _A_ 3 _U_ 111 _N_ _S_ "U(P)U(P)U(P)" {_A_ 3 _U_ 222 _N_ _N_ _N_ _N_} _N_ _N_ #-}
141 signalProcessGroup :: Int -> Int -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
142 {-# GHC_PRAGMA _A_ 3 _U_ 111 _N_ _S_ "U(P)U(P)U(P)" {_A_ 3 _U_ 222 _N_ _N_ _F_ _IF_ARGS_ 0 3 XXX 5 \ (u0 :: Int#) (u1 :: Int#) (u2 :: State# _RealWorld) -> case _#_ negateInt# [] [u1] of { _PRIM_ (u3 :: Int#) -> _APP_ _WRKR_ _ORIG_ LibPosixProcPrim signalProcess [ u0, u3, u2 ] } _N_} _F_ _ALWAYS_ \ (u0 :: Int) (u1 :: Int) (u2 :: _State _RealWorld) -> case u0 of { _ALG_ I# (u3 :: Int#) -> case u1 of { _ALG_ I# (u4 :: Int#) -> case u2 of { _ALG_ S# (u5 :: State# _RealWorld) -> case _#_ negateInt# [] [u4] of { _PRIM_ (u6 :: Int#) -> _APP_ _WRKR_ _ORIG_ LibPosixProcPrim signalProcess [ u3, u6, u5 ] }; _NO_DEFLT_ }; _NO_DEFLT_ }; _NO_DEFLT_ } _N_ #-}
143 sleep :: Int -> _State _RealWorld -> (Either IOError13 (), _State _RealWorld)
144 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(P)U(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-}
146 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
147 softwareTermination :: Int
148 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
149 unBlockSignals :: _ByteArray () -> _State _RealWorld -> (Either IOError13 (_ByteArray ()), _State _RealWorld)
150 {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _N_ _N_ _N_ #-}
151 userDefinedSignal1 :: Int
152 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
153 userDefinedSignal2 :: Int
154 {-# GHC_PRAGMA _A_ 0 _N_ _N_ _N_ _N_ _N_ #-}
155 instance Eq ProcessStatus
156 {-# GHC_PRAGMA _M_ LibPosixProcPrim {-dfun-} _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 3 _!_ _TUP_2 [(ProcessStatus -> ProcessStatus -> Bool), (ProcessStatus -> ProcessStatus -> Bool)] [_CONSTM_ Eq (==) (ProcessStatus), _CONSTM_ Eq (/=) (ProcessStatus)] _N_
157 (==) = { _A_ 2 _U_ 11 _N_ _S_ "SS" _N_ _N_ },
158 (/=) = { _A_ 2 _U_ 11 _N_ _S_ "SS" _N_ _N_ } #-}
160 {-# GHC_PRAGMA _M_ LibSystem {-dfun-} _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 3 _!_ _TUP_2 [(ExitCode -> ExitCode -> Bool), (ExitCode -> ExitCode -> Bool)] [_CONSTM_ Eq (==) (ExitCode), _CONSTM_ Eq (/=) (ExitCode)] _N_
161 (==) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
162 (/=) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ } #-}
163 instance Ord ProcessStatus
164 {-# GHC_PRAGMA _M_ LibPosixProcPrim {-dfun-} _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 9 _!_ _TUP_8 [{{Eq ProcessStatus}}, (ProcessStatus -> ProcessStatus -> Bool), (ProcessStatus -> ProcessStatus -> Bool), (ProcessStatus -> ProcessStatus -> Bool), (ProcessStatus -> ProcessStatus -> Bool), (ProcessStatus -> ProcessStatus -> ProcessStatus), (ProcessStatus -> ProcessStatus -> ProcessStatus), (ProcessStatus -> ProcessStatus -> _CMP_TAG)] [_DFUN_ Eq (ProcessStatus), _CONSTM_ Ord (<) (ProcessStatus), _CONSTM_ Ord (<=) (ProcessStatus), _CONSTM_ Ord (>=) (ProcessStatus), _CONSTM_ Ord (>) (ProcessStatus), _CONSTM_ Ord max (ProcessStatus), _CONSTM_ Ord min (ProcessStatus), _CONSTM_ Ord _tagCmp (ProcessStatus)] _N_
165 (<) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
166 (<=) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
167 (>=) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
168 (>) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
169 max = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
170 min = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
171 _tagCmp = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ } #-}
172 instance Ord ExitCode
173 {-# GHC_PRAGMA _M_ LibSystem {-dfun-} _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 9 _!_ _TUP_8 [{{Eq ExitCode}}, (ExitCode -> ExitCode -> Bool), (ExitCode -> ExitCode -> Bool), (ExitCode -> ExitCode -> Bool), (ExitCode -> ExitCode -> Bool), (ExitCode -> ExitCode -> ExitCode), (ExitCode -> ExitCode -> ExitCode), (ExitCode -> ExitCode -> _CMP_TAG)] [_DFUN_ Eq (ExitCode), _CONSTM_ Ord (<) (ExitCode), _CONSTM_ Ord (<=) (ExitCode), _CONSTM_ Ord (>=) (ExitCode), _CONSTM_ Ord (>) (ExitCode), _CONSTM_ Ord max (ExitCode), _CONSTM_ Ord min (ExitCode), _CONSTM_ Ord _tagCmp (ExitCode)] _N_
174 (<) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
175 (<=) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
176 (>=) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
177 (>) = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
178 max = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
179 min = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ },
180 _tagCmp = { _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ } #-}
181 instance Text ProcessStatus
182 {-# GHC_PRAGMA _M_ LibPosixProcPrim {-dfun-} _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 5 _!_ _TUP_4 [(Int -> [Char] -> [(ProcessStatus, [Char])]), (Int -> ProcessStatus -> [Char] -> [Char]), ([Char] -> [([ProcessStatus], [Char])]), ([ProcessStatus] -> [Char] -> [Char])] [_CONSTM_ Text readsPrec (ProcessStatus), _CONSTM_ Text showsPrec (ProcessStatus), _CONSTM_ Text readList (ProcessStatus), _CONSTM_ Text showList (ProcessStatus)] _N_
183 readsPrec = { _A_ 2 _U_ 12 _N_ _S_ "U(P)L" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ },
184 showsPrec = { _A_ 2 _U_ 112 _N_ _S_ "LS" _N_ _N_ },
185 readList = { _A_ 0 _U_ 2 _N_ _N_ _N_ _N_ },
186 showList = { _A_ 0 _U_ 12 _N_ _N_ _N_ _N_ } #-}
187 instance Text ExitCode
188 {-# GHC_PRAGMA _M_ LibSystem {-dfun-} _A_ 0 _N_ _N_ _N_ _F_ _IF_ARGS_ 0 0 X 5 _!_ _TUP_4 [(Int -> [Char] -> [(ExitCode, [Char])]), (Int -> ExitCode -> [Char] -> [Char]), ([Char] -> [([ExitCode], [Char])]), ([ExitCode] -> [Char] -> [Char])] [_CONSTM_ Text readsPrec (ExitCode), _CONSTM_ Text showsPrec (ExitCode), _CONSTM_ Text readList (ExitCode), _CONSTM_ Text showList (ExitCode)] _N_
189 readsPrec = { _A_ 2 _U_ 12 _N_ _N_ _N_ _N_ },
190 showsPrec = { _A_ 2 _U_ 112 _N_ _S_ "LS" _N_ _N_ },
191 readList = { _A_ 0 _U_ 2 _N_ _N_ _N_ _N_ },
192 showList = { _A_ 0 _U_ 12 _N_ _N_ _N_ _N_ } #-}