network 2.2.1 → 2.2.1.1
raw patch · 3 files changed
+12/−3 lines, 3 files
Files
- Network/Socket.hsc +4/−2
- Network/Socket/Internal.hsc +7/−0
- network.cabal +1/−1
Network/Socket.hsc view
@@ -1729,8 +1729,10 @@ unpackBits :: Bits b => [(a, b)] -> b -> [a] -unpackBits [] 0 = []-unpackBits [] r = error ("unpackBits: unhandled bits set: " ++ show r)+-- Be permissive and ignore unknown bit values. At least on OS X,+-- getaddrinfo returns an ai_flags field with bits set that have no+-- entry in <netdb.h>.+unpackBits [] _ = [] unpackBits ((k,v):xs) r | r .&. v /= 0 = k : unpackBits xs (r .&. complement v) | otherwise = unpackBits xs r
Network/Socket/Internal.hsc view
@@ -530,6 +530,8 @@ -> IO a -- ^ the 'IO' operation to be executed -> IO () +{-# SPECIALIZE throwSocketErrorIfMinus1_ :: String -> IO CInt -> IO () #-}+ -- | Throw an 'IOError' corresponding to the current socket error if -- the IO action returns a result of @-1@, but retries in case of an -- interrupted operation.@@ -538,6 +540,8 @@ -> IO a -- ^ the 'IO' operation to be executed -> IO a +{-# SPECIALIZE throwSocketErrorIfMinus1Retry :: String -> IO CInt -> IO CInt #-}+ -- | Throw an 'IOError' corresponding to the current socket error if -- the IO action returns a result of @-1@, but retries in case of an -- interrupted operation. Checks for operations that would block and@@ -548,6 +552,9 @@ -- immediate retry would block -> IO a -- ^ the 'IO' operation to be executed -> IO a++{-# SPECIALIZE throwSocketErrorIfMinus1RetryMayBlock+ :: String -> IO b -> IO CInt -> IO CInt #-} #if defined(__GLASGOW_HASKELL__) && (!defined(HAVE_WINSOCK_H) || defined(cygwin32_HOST_OS))
network.cabal view
@@ -1,5 +1,5 @@ name: network-version: 2.2.1+version: 2.2.1.1 license: BSD3 license-file: LICENSE maintainer: Johan Tibell <johan.tibell@gmail.com>