diff options
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r-- | src/Network/BitTorrent/DHT/ContactInfo.hs | 1 | ||||
-rw-r--r-- | src/Network/BitTorrent/DHT/Token.hs | 1 | ||||
-rw-r--r-- | src/Network/BitTorrent/MainlineDHT.hs | 13 |
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 | |||
20 | import Data.Time.Clock.POSIX | 20 | import Data.Time.Clock.POSIX |
21 | import Data.ByteString (ByteString) | 21 | import Data.ByteString (ByteString) |
22 | import Data.Word | 22 | import Data.Word |
23 | import Network.Socket (SockAddr(..)) | ||
24 | 23 | ||
25 | import Data.Torrent | 24 | import Data.Torrent |
26 | import Network.Address | 25 | import 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 | |||
61 | import Data.Time | 61 | import Data.Time |
62 | import System.Random | 62 | import System.Random |
63 | import Control.Concurrent.STM | 63 | import Control.Concurrent.STM |
64 | import 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 | |||
23 | import Data.BEncode.Pretty | 23 | import Data.BEncode.Pretty |
24 | import Data.BEncode.Types (BDict) | 24 | import Data.BEncode.Types (BDict) |
25 | import Data.Bits | 25 | import Data.Bits |
26 | import Data.Bits.ByteString | 26 | import Data.Bits.ByteString () |
27 | import Data.Bool | 27 | import Data.Bool |
28 | import qualified Data.ByteArray as BA | 28 | import Data.ByteArray (ByteArrayAccess) |
29 | ;import Data.ByteArray (ByteArrayAccess) | ||
30 | import qualified Data.ByteString as B | 29 | import qualified Data.ByteString as B |
31 | ;import Data.ByteString (ByteString) | 30 | ;import Data.ByteString (ByteString) |
32 | import qualified Data.ByteString.Base16 as Base16 | 31 | import qualified Data.ByteString.Base16 as Base16 |
@@ -45,7 +44,6 @@ import Data.IP hiding (fromSockAddr) | |||
45 | #else | 44 | #else |
46 | import Data.IP | 45 | import Data.IP |
47 | #endif | 46 | #endif |
48 | import Data.List | ||
49 | import Data.Maybe | 47 | import Data.Maybe |
50 | import Data.Monoid | 48 | import Data.Monoid |
51 | import Data.Ord | 49 | import Data.Ord |
@@ -53,14 +51,13 @@ import qualified Data.Serialize as S | |||
53 | import Data.Set (Set) | 51 | import Data.Set (Set) |
54 | import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime) | 52 | import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime) |
55 | import Data.Torrent | 53 | import Data.Torrent |
56 | import Data.Typeable | ||
57 | import Data.Word | 54 | import Data.Word |
58 | import qualified Data.Wrapper.PSQInt as Int | 55 | import qualified Data.Wrapper.PSQInt as Int |
59 | import Debug.Trace | 56 | import Debug.Trace |
60 | import Network.BitTorrent.MainlineDHT.Symbols | 57 | import Network.BitTorrent.MainlineDHT.Symbols |
61 | import Network.Kademlia | 58 | import Network.Kademlia |
62 | import Network.Kademlia.Bootstrap | 59 | import Network.Kademlia.Bootstrap |
63 | import Network.Address (Address, fromAddr, fromSockAddr, | 60 | import 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 | |||
68 | import Network.Kademlia.Search (Search (..)) | 65 | import Network.Kademlia.Search (Search (..)) |
69 | import Network.BitTorrent.DHT.Token as Token | 66 | import Network.BitTorrent.DHT.Token as Token |
70 | import qualified Network.Kademlia.Routing as R | 67 | import qualified Network.Kademlia.Routing as R |
71 | ;import Network.Kademlia.Routing (Timestamp, getTimestamp) | 68 | ;import Network.Kademlia.Routing (getTimestamp) |
72 | import Network.QueryResponse | 69 | import Network.QueryResponse |
73 | import Network.Socket | 70 | import Network.Socket |
74 | import System.IO | ||
75 | import System.IO.Error | 71 | import System.IO.Error |
76 | import System.IO.Unsafe (unsafeInterleaveIO) | 72 | import System.IO.Unsafe (unsafeInterleaveIO) |
77 | import qualified Text.ParserCombinators.ReadP as RP | 73 | import qualified Text.ParserCombinators.ReadP as RP |
@@ -81,7 +77,6 @@ import Control.Concurrent.Lifted.Instrument | |||
81 | import Control.Concurrent.Lifted | 77 | import Control.Concurrent.Lifted |
82 | import GHC.Conc (labelThread) | 78 | import GHC.Conc (labelThread) |
83 | #endif | 79 | #endif |
84 | import Control.Exception (SomeException (..), handle) | ||
85 | import qualified Data.Aeson as JSON | 80 | import qualified Data.Aeson as JSON |
86 | ;import Data.Aeson (FromJSON, ToJSON, (.=)) | 81 | ;import Data.Aeson (FromJSON, ToJSON, (.=)) |
87 | import Text.Read | 82 | import Text.Read |