0 | -- Note: This module is automatically generated when Idris builds
 1 | -- the library and the constants will be replaced with values
 2 | -- matching the system this is generated on.
 3 | --
 4 | -- The placeholders are here so that it works with tools like the LSP
 5 | -- without first compiling the library. They were generated on an x86_64
 6 | -- GNU/Linux system with GCC. If you are on a similar system, your numbers
 7 | -- might very well be identical.
 8 | module System.Posix.Process.Flags
 9 |
10 | import Data.Bits
11 | import Data.C.Integer
12 | import Derive.Prelude
13 |
14 | %default total
15 | %language ElabReflection
16 |
17 | public export
18 | record WaitFlags where
19 |   constructor F
20 |   flags : Bits32
21 |
22 | %runElab derive "WaitFlags" [Show,Eq,Ord,FromInteger]
23 |
24 | public export
25 | Semigroup WaitFlags where
26 |   F x <+> F y = F $ x .|. y
27 |
28 | public export
29 | Monoid WaitFlags where neutral = F 0
30 |
31 | public export
32 | data IdType = P_ALL | P_PID | P_PGID
33 |
34 | %runElab derive "IdType" [Show,Eq,Ord]
35 |
36 |
37 | public export
38 | WUNTRACED : WaitFlags
39 | WUNTRACED = 2
40 |
41 | public export
42 | WCONTINUED : WaitFlags
43 | WCONTINUED = 8
44 |
45 | public export
46 | WNOHANG : WaitFlags
47 | WNOHANG = 1
48 |
49 | public export
50 | WEXITED : WaitFlags
51 | WEXITED = 4
52 |
53 | public export
54 | WSTOPPED : WaitFlags
55 | WSTOPPED = 2
56 |
57 | public export
58 | WNOWAIT : WaitFlags
59 | WNOWAIT = 16777216
60 |
61 | public export
62 | idtypeCode : IdType -> Bits8
63 | idtypeCode P_ALL = 0
64 | idtypeCode P_PID = 1
65 | idtypeCode P_PGID = 2
66 |