From 9c551511ae5a0d6cf7fc77daf6bd6b16b8eb8977 Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 16 Jan 2017 23:04:35 -0500 Subject: Clean up all warnings (ghc 8.0.1) in DHT component. --- src/Network/BitTorrent/DHT/Session.hs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/Network/BitTorrent/DHT/Session.hs') diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs index 44a5f0e9..d9a50a15 100644 --- a/src/Network/BitTorrent/DHT/Session.hs +++ b/src/Network/BitTorrent/DHT/Session.hs @@ -66,9 +66,7 @@ module Network.BitTorrent.DHT.Session import Prelude hiding (ioError) -import Control.Applicative import Control.Concurrent.STM -import Control.Concurrent.Lifted hiding (yield) import Control.Concurrent.Async.Lifted import Control.Exception.Lifted hiding (Handler) import Control.Monad.Base @@ -82,16 +80,10 @@ import Data.Fixed import Data.Hashable import Data.List as L import Data.Maybe -import Data.Monoid import Data.Set as S -import Data.Text as T import Data.Time -import Data.Time.Clock.POSIX import Network (PortNumber) -import System.Log.FastLogger import System.Random (randomIO) -import Text.PrettyPrint as PP hiding ((<>), ($$)) -import Text.PrettyPrint.HughesPJClass hiding ((<>),($$)) import Data.Torrent as Torrent import Network.KRPC as KRPC hiding (Options, def) @@ -118,7 +110,7 @@ defaultAlpha = 3 -- TODO do not insert infohash -> peeraddr if infohash is too far from -- this node id - +{- data Order = NearFirst | FarFirst @@ -127,6 +119,7 @@ data Order data Traversal = Greedy -- ^ aggressive short-circuit traversal | Exhaustive -- ^ +-} -- | Original Kamelia DHT uses term /publish/ for data replication -- process. BitTorrent DHT uses term /announce/ since the purpose of @@ -460,11 +453,11 @@ deleteTopic ih p = do -- Messaging -----------------------------------------------------------------------} --- TODO: use alpha -- | Failed queries are ignored. queryParallel :: [DHT ip a] -> DHT ip [a] queryParallel queries = do - alpha <- asks (optAlpha . options) + -- TODO: use alpha + -- alpha <- asks (optAlpha . options) cleanup <$> mapConcurrently try queries where cleanup :: [Either QueryFailure a] -> [a] -- cgit v1.2.3