@@ -61,10 +61,12 @@ initMulticast host port bufferSize = do
62type UDPState = Map SockAddr BSL.ByteString
62type UDPState = Map SockAddr BSL.ByteString
64−-- TODO: This is inefficient and an orphan instance.
64+#if MIN_VERSION_network(2,4,0)
65−-- Requested official instance (https://github.com/haskell/network/issues/38)
65+-- network-2.4.0 provides the Ord instance for us
66instance Ord SockAddr where
67instance Ord SockAddr where
67 compare = compare `on` show
68 compare = compare `on` show
69bufferFor :: SockAddr -> Accessor UDPState BSL.ByteString
71bufferFor :: SockAddr -> Accessor UDPState BSL.ByteString
70bufferFor = DAC.mapDefault BSL.empty
72bufferFor = DAC.mapDefault BSL.empty