File tree Expand file tree Collapse file tree 10 files changed +46
-46
lines changed Expand file tree Collapse file tree 10 files changed +46
-46
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,11 @@ import Network.Socket.ReadShow
50
50
-- is supported on your system: see 'isSupportedSocketOption'
51
51
data SocketOption = SockOpt
52
52
#if __GLASGOW_HASKELL__ >= 806
53
- ! CInt -- ^ Option Level
54
- ! CInt -- ^ Option Name
53
+ CInt -- ^ Option Level
54
+ CInt -- ^ Option Name
55
55
#else
56
- ! CInt -- Option Level
57
- ! CInt -- Option Name
56
+ CInt -- Option Level
57
+ CInt -- Option Name
58
58
#endif
59
59
deriving (Eq )
60
60
Original file line number Diff line number Diff line change @@ -26,16 +26,16 @@ import qualified Text.Read as P
26
26
27
27
-- | Control message (ancillary data) including a pair of level and type.
28
28
data Cmsg = Cmsg {
29
- cmsgId :: ! CmsgId
30
- , cmsgData :: ! ByteString
29
+ cmsgId :: CmsgId
30
+ , cmsgData :: ByteString
31
31
} deriving (Eq , Show )
32
32
33
33
----------------------------------------------------------------
34
34
35
35
-- | Identifier of control message (ancillary data).
36
36
data CmsgId = CmsgId {
37
- cmsgLevel :: ! CInt
38
- , cmsgType :: ! CInt
37
+ cmsgLevel :: CInt
38
+ , cmsgType :: CInt
39
39
} deriving (Eq )
40
40
41
41
-- | Unsupported identifier
Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ import Network.Socket.Types
23
23
24
24
data CmsgHdr = CmsgHdr {
25
25
#ifdef __linux__
26
- cmsgHdrLen :: ! CSize
26
+ cmsgHdrLen :: CSize
27
27
# else
28
- cmsgHdrLen :: ! ( # type socklen_t )
28
+ cmsgHdrLen :: # type socklen_t
29
29
# endif
30
- , cmsgHdrLevel :: ! CInt
31
- , cmsgHdrType :: ! CInt
30
+ , cmsgHdrLevel :: CInt
31
+ , cmsgHdrType :: CInt
32
32
} deriving (Eq , Show )
33
33
34
34
instance Storable CmsgHdr where
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ import Network.Socket.Imports
14
14
#include <sys/uio.h>
15
15
16
16
data IOVec = IOVec
17
- { iovBase :: ! ( Ptr Word8 )
18
- , iovLen :: ! CSize
17
+ { iovBase :: Ptr Word8
18
+ , iovLen :: CSize
19
19
}
20
20
21
21
instance Storable IOVec where
Original file line number Diff line number Diff line change @@ -14,21 +14,21 @@ import Network.Socket.Internal (zeroMemory)
14
14
import Network.Socket.Posix.IOVec (IOVec )
15
15
16
16
data MsgHdr sa = MsgHdr
17
- { msgName :: ! ( Ptr sa )
18
- , msgNameLen :: ! ( # type socklen_t )
19
- , msgIov :: ! ( Ptr IOVec )
17
+ { msgName :: Ptr sa
18
+ , msgNameLen :: # type socklen_t
19
+ , msgIov :: Ptr IOVec
20
20
# ifdef __linux__
21
- , msgIovLen :: ! CSize
21
+ , msgIovLen :: CSize
22
22
# else
23
- , msgIovLen :: ! CInt
23
+ , msgIovLen :: CInt
24
24
# endif
25
- , msgCtrl :: ! ( Ptr Word8 )
25
+ , msgCtrl :: Ptr Word8
26
26
# ifdef __linux__
27
- , msgCtrlLen :: ! CSize
27
+ , msgCtrlLen :: CSize
28
28
# else
29
- , msgCtrlLen :: ! ( # type socklen_t )
29
+ , msgCtrlLen :: # type socklen_t
30
30
# endif
31
- , msgFlags :: ! CInt
31
+ , msgFlags :: CInt
32
32
}
33
33
34
34
instance Storable (MsgHdr sa ) where
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ import Network.Socket.ReadShow
104
104
-----------------------------------------------------------------------------
105
105
106
106
-- | Basic type for a socket.
107
- data Socket = Socket ! (IORef CInt ) ! CInt {- for Show -}
107
+ data Socket = Socket (IORef CInt ) CInt {- for Show -}
108
108
109
109
instance Show Socket where
110
110
show (Socket _ ofd) = " <socket: " ++ show ofd ++ " >"
@@ -1052,13 +1052,13 @@ type ScopeID = Word32
1052
1052
-- 'isSupportedSockAddr'.
1053
1053
data SockAddr
1054
1054
= SockAddrInet
1055
- ! PortNumber -- sin_port
1056
- ! HostAddress -- sin_addr (ditto)
1055
+ PortNumber -- sin_port
1056
+ HostAddress -- sin_addr (ditto)
1057
1057
| SockAddrInet6
1058
- ! PortNumber -- sin6_port
1059
- ! FlowInfo -- sin6_flowinfo (ditto)
1060
- ! HostAddress6 -- sin6_addr (ditto)
1061
- ! ScopeID -- sin6_scope_id (ditto)
1058
+ PortNumber -- sin6_port
1059
+ FlowInfo -- sin6_flowinfo (ditto)
1060
+ HostAddress6 -- sin6_addr (ditto)
1061
+ ScopeID -- sin6_scope_id (ditto)
1062
1062
-- | The path must have fewer than 104 characters. All of these characters must have code points less than 256.
1063
1063
| SockAddrUnix
1064
1064
String -- sun_path
Original file line number Diff line number Diff line change @@ -27,16 +27,16 @@ type ULONG = Word32
27
27
28
28
-- | Control message (ancillary data) including a pair of level and type.
29
29
data Cmsg = Cmsg {
30
- cmsgId :: ! CmsgId
31
- , cmsgData :: ! ByteString
30
+ cmsgId :: CmsgId
31
+ , cmsgData :: ByteString
32
32
} deriving (Eq , Show )
33
33
34
34
----------------------------------------------------------------
35
35
36
36
-- | Identifier of control message (ancillary data).
37
37
data CmsgId = CmsgId {
38
- cmsgLevel :: ! CInt
39
- , cmsgType :: ! CInt
38
+ cmsgLevel :: CInt
39
+ , cmsgType :: CInt
40
40
} deriving (Eq )
41
41
42
42
-- | Unsupported identifier
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ import Network.Socket.Win32.MsgHdr
19
19
import Network.Socket.Types
20
20
21
21
data CmsgHdr = CmsgHdr {
22
- cmsgHdrLen :: ! CUInt
23
- , cmsgHdrLevel :: ! CInt
24
- , cmsgHdrType :: ! CInt
22
+ cmsgHdrLen :: CUInt
23
+ , cmsgHdrLevel :: CInt
24
+ , cmsgHdrType :: CInt
25
25
} deriving (Eq , Show )
26
26
27
27
instance Storable CmsgHdr where
Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ type ULONG = Word32
18
18
-- The size of BufferLen is different on pre-vista compilers.
19
19
-- But since those platforms are out of support anyway we ignore that.
20
20
data MsgHdr sa = MsgHdr
21
- { msgName :: ! ( Ptr sa )
22
- , msgNameLen :: ! CInt
23
- , msgBuffer :: ! ( Ptr WSABuf )
24
- , msgBufferLen :: ! DWORD
25
- , msgCtrl :: ! ( Ptr Word8 )
26
- , msgCtrlLen :: ! ULONG
27
- , msgFlags :: ! DWORD
21
+ { msgName :: Ptr sa
22
+ , msgNameLen :: CInt
23
+ , msgBuffer :: Ptr WSABuf
24
+ , msgBufferLen :: DWORD
25
+ , msgCtrl :: Ptr Word8
26
+ , msgCtrlLen :: ULONG
27
+ , msgFlags :: DWORD
28
28
} deriving Show
29
29
30
30
instance Storable (MsgHdr sa ) where
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ import Network.Socket.Imports
15
15
type ULONG = Word32
16
16
17
17
data WSABuf = WSABuf
18
- { wsaBufPtr :: ! ( Ptr Word8 )
19
- , wsaBufLen :: ! ULONG
18
+ { wsaBufPtr :: Ptr Word8
19
+ , wsaBufLen :: ULONG
20
20
}
21
21
22
22
instance Storable WSABuf where
You can’t perform that action at this time.
0 commit comments