@@ -18,7 +18,7 @@ instance Sem.Semigroup MsgFlag where
18
18
(<>) = (.|.)
19
19
20
20
instance Monoid MsgFlag where
21
- mempty = 0
21
+ mempty = MsgFlag 0
22
22
#if !(MIN_VERSION_base(4,11,0))
23
23
mappend = (Sem. <>)
24
24
#endif
@@ -28,53 +28,53 @@ pattern MSG_OOB :: MsgFlag
28
28
#ifdef MSG_OOB
29
29
pattern MSG_OOB = MsgFlag (# const MSG_OOB )
30
30
#else
31
- pattern MSG_OOB = mempty
31
+ pattern MSG_OOB = MsgFlag 0
32
32
#endif
33
33
34
34
-- | Bypass routing table lookup.
35
35
pattern MSG_DONTROUTE :: MsgFlag
36
36
#ifdef MSG_DONTROUTE
37
37
pattern MSG_DONTROUTE = MsgFlag (# const MSG_DONTROUTE )
38
38
#else
39
- pattern MSG_DONTROUTE = mempty
39
+ pattern MSG_DONTROUTE = MsgFlag 0
40
40
#endif
41
41
42
42
-- | Peek at incoming message without removing it from the queue.
43
43
pattern MSG_PEEK :: MsgFlag
44
44
#ifdef MSG_PEEK
45
45
pattern MSG_PEEK = MsgFlag (# const MSG_PEEK )
46
46
#else
47
- pattern MSG_PEEK = mempty
47
+ pattern MSG_PEEK = MsgFlag 0
48
48
#endif
49
49
50
50
-- | End of record.
51
51
pattern MSG_EOR :: MsgFlag
52
52
#ifdef MSG_EOR
53
53
pattern MSG_EOR = MsgFlag (# const MSG_EOR )
54
54
#else
55
- pattern MSG_EOR = mempty
55
+ pattern MSG_EOR = MsgFlag 0
56
56
#endif
57
57
58
58
-- | Received data is truncated. More data exist.
59
59
pattern MSG_TRUNC :: MsgFlag
60
60
#ifdef MSG_TRUNC
61
61
pattern MSG_TRUNC = MsgFlag (# const MSG_TRUNC )
62
62
#else
63
- pattern MSG_TRUNC = mempty
63
+ pattern MSG_TRUNC = MsgFlag 0
64
64
#endif
65
65
66
66
-- | Received control message is truncated. More control message exist.
67
67
pattern MSG_CTRUNC :: MsgFlag
68
68
#ifdef MSG_CTRUNC
69
69
pattern MSG_CTRUNC = MsgFlag (# const MSG_CTRUNC )
70
70
#else
71
- pattern MSG_CTRUNC = mempty
71
+ pattern MSG_CTRUNC = MsgFlag 0
72
72
#endif
73
73
74
74
-- | Wait until the requested number of bytes have been read.
75
75
pattern MSG_WAITALL :: MsgFlag
76
76
#ifdef MSG_WAITALL
77
77
pattern MSG_WAITALL = MsgFlag (# const MSG_WAITALL )
78
78
#else
79
- pattern MSG_WAITALL = mempty
79
+ pattern MSG_WAITALL = MsgFlag 0
80
80
#endif
0 commit comments