Skip to content

Commit 3da86ef

Browse files
committed
fixing pattern synonym.
1 parent 54f3afc commit 3da86ef

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Network/Socket/Flag.hsc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ instance Sem.Semigroup MsgFlag where
1818
(<>) = (.|.)
1919

2020
instance Monoid MsgFlag where
21-
mempty = 0
21+
mempty = MsgFlag 0
2222
#if !(MIN_VERSION_base(4,11,0))
2323
mappend = (Sem.<>)
2424
#endif
@@ -28,53 +28,53 @@ pattern MSG_OOB :: MsgFlag
2828
#ifdef MSG_OOB
2929
pattern MSG_OOB = MsgFlag (#const MSG_OOB)
3030
#else
31-
pattern MSG_OOB = mempty
31+
pattern MSG_OOB = MsgFlag 0
3232
#endif
3333

3434
-- | Bypass routing table lookup.
3535
pattern MSG_DONTROUTE :: MsgFlag
3636
#ifdef MSG_DONTROUTE
3737
pattern MSG_DONTROUTE = MsgFlag (#const MSG_DONTROUTE)
3838
#else
39-
pattern MSG_DONTROUTE = mempty
39+
pattern MSG_DONTROUTE = MsgFlag 0
4040
#endif
4141

4242
-- | Peek at incoming message without removing it from the queue.
4343
pattern MSG_PEEK :: MsgFlag
4444
#ifdef MSG_PEEK
4545
pattern MSG_PEEK = MsgFlag (#const MSG_PEEK)
4646
#else
47-
pattern MSG_PEEK = mempty
47+
pattern MSG_PEEK = MsgFlag 0
4848
#endif
4949

5050
-- | End of record.
5151
pattern MSG_EOR :: MsgFlag
5252
#ifdef MSG_EOR
5353
pattern MSG_EOR = MsgFlag (#const MSG_EOR)
5454
#else
55-
pattern MSG_EOR = mempty
55+
pattern MSG_EOR = MsgFlag 0
5656
#endif
5757

5858
-- | Received data is truncated. More data exist.
5959
pattern MSG_TRUNC :: MsgFlag
6060
#ifdef MSG_TRUNC
6161
pattern MSG_TRUNC = MsgFlag (#const MSG_TRUNC)
6262
#else
63-
pattern MSG_TRUNC = mempty
63+
pattern MSG_TRUNC = MsgFlag 0
6464
#endif
6565

6666
-- | Received control message is truncated. More control message exist.
6767
pattern MSG_CTRUNC :: MsgFlag
6868
#ifdef MSG_CTRUNC
6969
pattern MSG_CTRUNC = MsgFlag (#const MSG_CTRUNC)
7070
#else
71-
pattern MSG_CTRUNC = mempty
71+
pattern MSG_CTRUNC = MsgFlag 0
7272
#endif
7373

7474
-- | Wait until the requested number of bytes have been read.
7575
pattern MSG_WAITALL :: MsgFlag
7676
#ifdef MSG_WAITALL
7777
pattern MSG_WAITALL = MsgFlag (#const MSG_WAITALL)
7878
#else
79-
pattern MSG_WAITALL = mempty
79+
pattern MSG_WAITALL = MsgFlag 0
8080
#endif

0 commit comments

Comments
 (0)