From df11dab3409ecc0f6bb5202b45d6b63dd73b9928 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 24 Mar 2023 11:58:29 +0900 Subject: [PATCH] fixing doc --- Network/Socket/Options.hsc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Network/Socket/Options.hsc b/Network/Socket/Options.hsc index d97524b6..455bca0d 100644 --- a/Network/Socket/Options.hsc +++ b/Network/Socket/Options.hsc @@ -353,8 +353,7 @@ whenSupported s action | isSupportedSocketOption s = action >> return () | otherwise = return () --- | Set a socket option that expects an Int value. --- There is currently no API to set e.g. the timeval socket options +-- | Set a socket option that expects an 'Int' value. setSocketOption :: Socket -> SocketOption -- Option Name -> Int -- Option Value @@ -379,8 +378,7 @@ setSockOpt s (SockOpt level opt) v = do throwSocketErrorIfMinus1_ "Network.Socket.setSockOpt" $ c_setsockopt fd level opt ptr sz --- | Get a socket option that gives an Int value. --- There is currently no API to get e.g. the timeval socket options +-- | Get a socket option that gives an 'Int' value. getSocketOption :: Socket -> SocketOption -- Option Name -> IO Int -- Option Value @@ -396,8 +394,8 @@ getSocketOption s so = do -- | Get a socket option. getSockOpt :: forall a . Storable a => Socket - -> SocketOption -- Option Name - -> IO a -- Option Value + -> SocketOption -- Option Name + -> IO a -- Option Value getSockOpt s (SockOpt level opt) = do alloca $ \ptr -> do let sz = fromIntegral $ sizeOf (undefined :: a)