8 | module System.Posix.Process.Flags
11 | import Data.C.Integer
12 | import Derive.Prelude
15 | %language ElabReflection
18 | record WaitFlags where
22 | %runElab derive "WaitFlags" [Show,Eq,Ord,FromInteger]
25 | Semigroup WaitFlags where
26 | F x <+> F y = F $
x .|. y
29 | Monoid WaitFlags where neutral = F 0
32 | data IdType = P_ALL | P_PID | P_PGID
34 | %runElab derive "IdType" [Show,Eq,Ord]
38 | WUNTRACED : WaitFlags
42 | WCONTINUED : WaitFlags
54 | WSTOPPED : WaitFlags
62 | idtypeCode : IdType -> Bits8
63 | idtypeCode P_ALL = 0
64 | idtypeCode P_PID = 1
65 | idtypeCode P_PGID = 2