From 9d29533870563289d3b1a6d14cc7b04ee4e6bdb2 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 30 May 2023 17:53:43 +0900 Subject: [PATCH] fixing strict --- Network/Socket/Options.hsc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Network/Socket/Options.hsc b/Network/Socket/Options.hsc index 6aeaee24..e8e62a03 100644 --- a/Network/Socket/Options.hsc +++ b/Network/Socket/Options.hsc @@ -488,16 +488,16 @@ newtype SocketTimeout = SocketTimeout Word32 deriving (Eq, Ord, Show) #if defined(mingw32_HOST_OS) instance Storable SocketTimeout where - sizeOf (SocketTimeout to) = sizeOf to -- DWORD as milliseconds - alignment _ = 0 + sizeOf ~(SocketTimeout to) = sizeOf to -- DWORD as milliseconds + alignment ~_ = 0 peek ptr = do to <- peek (castPtr ptr) return $ SocketTimeout (to * 1000) poke ptr (SocketTimeout to) = poke (castPtr ptr) (to `div` 1000) #else instance Storable SocketTimeout where - sizeOf _ = (#size struct timeval) - alignment _ = (#const offsetof(struct {char x__; struct timeval (y__); }, y__)) + sizeOf ~_ = (#size struct timeval) + alignment ~_ = (#const offsetof(struct {char x__; struct timeval (y__); }, y__)) peek ptr = do sec <- (#peek struct timeval, tv_sec) ptr usec <- (#peek struct timeval, tv_usec) ptr