network 3.2.5.0 → 3.2.6.0
raw patch · 5 files changed
+23/−4 lines, 5 files
Files
- CHANGELOG.md +4/−0
- Network/Socket/Info.hsc +11/−2
- Network/Socket/Types.hsc +6/−0
- configure.ac +1/−1
- network.cabal +1/−1
CHANGELOG.md view
@@ -1,3 +1,7 @@+## Version 3.2.6.0++* fixing the Show instance of IPv4-mapped IPv6 address on little endian machines+ ## Version 3.2.5.0 * `gracefulClose` based on STM racing and `timeout`.
Network/Socket/Info.hsc view
@@ -448,6 +448,10 @@ ----------------------------------------------------------------------------- -- SockAddr +-- |+--+-- >>> SockAddrInet6 80 0 (0,0,0xffff,0x01020304) 0+-- [::ffff:1.2.3.4]:80 instance Show SockAddr where showsPrec _ (SockAddrUnix str) = showString str showsPrec _ (SockAddrInet port ha)@@ -467,6 +471,11 @@ let (u3, u2, u1, u0) = hostAddressToTuple ip in foldr1 (.) . intersperse (showChar '.') $ map showInt [u3, u2, u1, u0] +showHostAddress' :: HostAddress -> ShowS+showHostAddress' ip =+ let (u3, u2, u1, u0) = hostAddressToTuple' ip in+ foldr1 (.) . intersperse (showChar '.') $ map showInt [u3, u2, u1, u0]+ -- Taken from showIPv6 in Data.IP.Addr. -- | Show an IPv6 address in the most appropriate notation, based on recommended@@ -478,10 +487,10 @@ showHostAddress6 ha6@(a1, a2, a3, a4) -- IPv4-Mapped IPv6 Address | a1 == 0 && a2 == 0 && a3 == 0xffff =- showString "::ffff:" . showHostAddress a4+ showString "::ffff:" . showHostAddress' a4 -- IPv4-Compatible IPv6 Address (exclude IPRange ::/112) | a1 == 0 && a2 == 0 && a3 == 0 && a4 >= 0x10000 =- showString "::" . showHostAddress a4+ showString "::" . showHostAddress' a4 -- length of longest run > 1, replace it with "::" | end - begin > 1 = showFields prefix . showString "::" . showFields suffix
Network/Socket/Types.hsc view
@@ -57,6 +57,7 @@ , isSupportedSockAddr , HostAddress , hostAddressToTuple+ , hostAddressToTuple' , tupleToHostAddress , HostAddress6 , hostAddress6ToTuple@@ -1229,6 +1230,11 @@ hostAddressToTuple ha' = let ha = htonl ha' byte i = fromIntegral (ha `shiftR` i) :: Word8+ in (byte 24, byte 16, byte 8, byte 0)++hostAddressToTuple' :: HostAddress -> (Word8, Word8, Word8, Word8)+hostAddressToTuple' ha =+ let byte i = fromIntegral (ha `shiftR` i) :: Word8 in (byte 24, byte 16, byte 8, byte 0) -- | Converts IPv4 quadruple to 'HostAddress'.
configure.ac view
@@ -1,5 +1,5 @@ AC_INIT([Haskell network package],- [3.2.5.0],+ [3.2.6.0], [libraries@haskell.org], [network])
network.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: network-version: 3.2.5.0+version: 3.2.6.0 license: BSD3 license-file: LICENSE maintainer: Kazu Yamamoto, Tamar Christina