summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/DHT/ContactInfo.hs1
-rw-r--r--src/Network/BitTorrent/DHT/Token.hs1
-rw-r--r--src/Network/BitTorrent/MainlineDHT.hs13
3 files changed, 4 insertions, 11 deletions
diff --git a/src/Network/BitTorrent/DHT/ContactInfo.hs b/src/Network/BitTorrent/DHT/ContactInfo.hs
index ed38caf7..ec7e6658 100644
--- a/src/Network/BitTorrent/DHT/ContactInfo.hs
+++ b/src/Network/BitTorrent/DHT/ContactInfo.hs
@@ -20,7 +20,6 @@ import Data.Wrapper.PSQ as PSQ
20import Data.Time.Clock.POSIX 20import Data.Time.Clock.POSIX
21import Data.ByteString (ByteString) 21import Data.ByteString (ByteString)
22import Data.Word 22import Data.Word
23import Network.Socket (SockAddr(..))
24 23
25import Data.Torrent 24import Data.Torrent
26import Network.Address 25import Network.Address
diff --git a/src/Network/BitTorrent/DHT/Token.hs b/src/Network/BitTorrent/DHT/Token.hs
index 3da59c53..171cc8be 100644
--- a/src/Network/BitTorrent/DHT/Token.hs
+++ b/src/Network/BitTorrent/DHT/Token.hs
@@ -61,7 +61,6 @@ import Data.String
61import Data.Time 61import Data.Time
62import System.Random 62import System.Random
63import Control.Concurrent.STM 63import Control.Concurrent.STM
64import Network.Address
65 64
66-- TODO use ShortByteString 65-- TODO use ShortByteString
67 66
diff --git a/src/Network/BitTorrent/MainlineDHT.hs b/src/Network/BitTorrent/MainlineDHT.hs
index 626f980f..c5b99234 100644
--- a/src/Network/BitTorrent/MainlineDHT.hs
+++ b/src/Network/BitTorrent/MainlineDHT.hs
@@ -23,10 +23,9 @@ import qualified Data.BEncode.BDict as BE
23import Data.BEncode.Pretty 23import Data.BEncode.Pretty
24import Data.BEncode.Types (BDict) 24import Data.BEncode.Types (BDict)
25import Data.Bits 25import Data.Bits
26import Data.Bits.ByteString 26import Data.Bits.ByteString ()
27import Data.Bool 27import Data.Bool
28import qualified Data.ByteArray as BA 28import Data.ByteArray (ByteArrayAccess)
29 ;import Data.ByteArray (ByteArrayAccess)
30import qualified Data.ByteString as B 29import qualified Data.ByteString as B
31 ;import Data.ByteString (ByteString) 30 ;import Data.ByteString (ByteString)
32import qualified Data.ByteString.Base16 as Base16 31import qualified Data.ByteString.Base16 as Base16
@@ -45,7 +44,6 @@ import Data.IP hiding (fromSockAddr)
45#else 44#else
46import Data.IP 45import Data.IP
47#endif 46#endif
48import Data.List
49import Data.Maybe 47import Data.Maybe
50import Data.Monoid 48import Data.Monoid
51import Data.Ord 49import Data.Ord
@@ -53,14 +51,13 @@ import qualified Data.Serialize as S
53import Data.Set (Set) 51import Data.Set (Set)
54import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime) 52import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime)
55import Data.Torrent 53import Data.Torrent
56import Data.Typeable
57import Data.Word 54import Data.Word
58import qualified Data.Wrapper.PSQInt as Int 55import qualified Data.Wrapper.PSQInt as Int
59import Debug.Trace 56import Debug.Trace
60import Network.BitTorrent.MainlineDHT.Symbols 57import Network.BitTorrent.MainlineDHT.Symbols
61import Network.Kademlia 58import Network.Kademlia
62import Network.Kademlia.Bootstrap 59import Network.Kademlia.Bootstrap
63import Network.Address (Address, fromAddr, fromSockAddr, 60import Network.Address (fromSockAddr,
64 setPort, sockAddrPort, testIdBit, 61 setPort, sockAddrPort, testIdBit,
65 toSockAddr, genBucketSample', WantIP(..), 62 toSockAddr, genBucketSample', WantIP(..),
66 un4map,either4or6,ipFamily) 63 un4map,either4or6,ipFamily)
@@ -68,10 +65,9 @@ import Network.BitTorrent.DHT.ContactInfo as Peers
68import Network.Kademlia.Search (Search (..)) 65import Network.Kademlia.Search (Search (..))
69import Network.BitTorrent.DHT.Token as Token 66import Network.BitTorrent.DHT.Token as Token
70import qualified Network.Kademlia.Routing as R 67import qualified Network.Kademlia.Routing as R
71 ;import Network.Kademlia.Routing (Timestamp, getTimestamp) 68 ;import Network.Kademlia.Routing (getTimestamp)
72import Network.QueryResponse 69import Network.QueryResponse
73import Network.Socket 70import Network.Socket
74import System.IO
75import System.IO.Error 71import System.IO.Error
76import System.IO.Unsafe (unsafeInterleaveIO) 72import System.IO.Unsafe (unsafeInterleaveIO)
77import qualified Text.ParserCombinators.ReadP as RP 73import qualified Text.ParserCombinators.ReadP as RP
@@ -81,7 +77,6 @@ import Control.Concurrent.Lifted.Instrument
81import Control.Concurrent.Lifted 77import Control.Concurrent.Lifted
82import GHC.Conc (labelThread) 78import GHC.Conc (labelThread)
83#endif 79#endif
84import Control.Exception (SomeException (..), handle)
85import qualified Data.Aeson as JSON 80import qualified Data.Aeson as JSON
86 ;import Data.Aeson (FromJSON, ToJSON, (.=)) 81 ;import Data.Aeson (FromJSON, ToJSON, (.=))
87import Text.Read 82import Text.Read