From 07202340d82fddc32f1cad82a437a438565cc2ba Mon Sep 17 00:00:00 2001 From: "jim@bo" Date: Wed, 20 Jun 2018 03:08:45 -0400 Subject: port to newer versions of packages: * iproute >= 1.7.4 * conduit-extra >= 1.1.7 --- src/Network/Address.hs | 4 ++++ src/Network/BitTorrent/MainlineDHT.hs | 4 ++++ src/Network/Kademlia.hs | 4 ++++ src/Network/Kademlia/Bootstrap.hs | 4 ++++ src/Network/Tox.hs | 4 ++++ src/Network/Tox/DHT/Handlers.hs | 4 ++++ src/Network/Tox/NodeId.hs | 4 ++++ src/Network/Tox/Onion/Handlers.hs | 4 ++++ src/Network/Tox/Onion/Transport.hs | 5 +++++ 9 files changed, 37 insertions(+) (limited to 'src/Network') diff --git a/src/Network/Address.hs b/src/Network/Address.hs index 4f163b79..3766d614 100644 --- a/src/Network/Address.hs +++ b/src/Network/Address.hs @@ -103,7 +103,11 @@ import qualified Data.ByteString.Lazy.Builder as BS import Data.Char import Data.Convertible import Data.Default +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.List as L import Data.List.Split as L import Data.Maybe (fromMaybe, catMaybes, mapMaybe) diff --git a/src/Network/BitTorrent/MainlineDHT.hs b/src/Network/BitTorrent/MainlineDHT.hs index 991473a9..847d820b 100644 --- a/src/Network/BitTorrent/MainlineDHT.hs +++ b/src/Network/BitTorrent/MainlineDHT.hs @@ -40,7 +40,11 @@ import Data.Default import Data.Digest.CRC32C import Data.Function (fix) import Data.Hashable +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.List import Data.Maybe import Data.Monoid diff --git a/src/Network/Kademlia.hs b/src/Network/Kademlia.hs index 0ab26e80..50c98967 100644 --- a/src/Network/Kademlia.hs +++ b/src/Network/Kademlia.hs @@ -22,7 +22,11 @@ import Control.Concurrent.STM import Control.Monad import Data.Bits import Data.Hashable +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.Monoid import Data.Serialize (Serialize) import Data.Time.Clock.POSIX (POSIXTime) diff --git a/src/Network/Kademlia/Bootstrap.hs b/src/Network/Kademlia/Bootstrap.hs index bc8188a7..d77f524c 100644 --- a/src/Network/Kademlia/Bootstrap.hs +++ b/src/Network/Kademlia/Bootstrap.hs @@ -29,7 +29,11 @@ import Control.Concurrent.STM import Control.Monad import Data.Bits import Data.Hashable +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.Monoid import Data.Serialize (Serialize) import Data.Time.Clock.POSIX (POSIXTime) diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index 89a8d99f..45f8e633 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs @@ -62,7 +62,11 @@ import Data.Conduit (Source,Sink,Flush(..)) import Data.Data import Data.Functor.Contravariant import Data.Hashable +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.Maybe import qualified Data.MinMaxPSQ as MinMaxPSQ ;import Data.MinMaxPSQ (MinMaxPSQ') diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs index 7e986fdd..43169fa0 100644 --- a/src/Network/Tox/DHT/Handlers.hs +++ b/src/Network/Tox/DHT/Handlers.hs @@ -32,7 +32,11 @@ import Network.Socket import Data.Hashable import qualified Data.HashMap.Strict as HashMap ;import Data.HashMap.Strict (HashMap) +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.Ord import Data.Maybe import Data.Bits diff --git a/src/Network/Tox/NodeId.hs b/src/Network/Tox/NodeId.hs index f3013142..5eb3742e 100644 --- a/src/Network/Tox/NodeId.hs +++ b/src/Network/Tox/NodeId.hs @@ -59,7 +59,11 @@ import qualified Data.ByteString.Char8 as C8 import Data.Char import Data.Data import Data.Hashable +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.List import Data.Maybe import Data.Serialize as S diff --git a/src/Network/Tox/Onion/Handlers.hs b/src/Network/Tox/Onion/Handlers.hs index 263d60bd..f497a1bf 100644 --- a/src/Network/Tox/Onion/Handlers.hs +++ b/src/Network/Tox/Onion/Handlers.hs @@ -44,7 +44,11 @@ import GHC.Conc (labelThread) import Control.Concurrent.STM import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime) import Network.Socket +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.Maybe import Data.Bits import Data.Ord diff --git a/src/Network/Tox/Onion/Transport.hs b/src/Network/Tox/Onion/Transport.hs index 864e831f..0da48f76 100644 --- a/src/Network/Tox/Onion/Transport.hs +++ b/src/Network/Tox/Onion/Transport.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} @@ -65,7 +66,11 @@ import Data.Coerce import Data.Function import Data.Functor.Contravariant import Data.Functor.Identity +#if MIN_VERSION_iproute(1,7,4) +import Data.IP hiding (fromSockAddr) +#else import Data.IP +#endif import Data.Maybe import Data.Monoid import Data.Serialize as S -- cgit v1.2.3