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