diff options
-rw-r--r-- | bittorrent.cabal | 4 | ||||
-rw-r--r-- | src/Network/BitTorrent/Exchange/Bitfield.hs (renamed from src/Data/Torrent/Bitfield.hs) | 6 | ||||
-rw-r--r-- | src/Network/BitTorrent/Exchange/Connection.hs | 4 | ||||
-rw-r--r-- | src/Network/BitTorrent/Exchange/Message.hs | 2 | ||||
-rw-r--r-- | src/Network/BitTorrent/Exchange/Selection.hs | 2 | ||||
-rw-r--r-- | src/Network/BitTorrent/Exchange/Session.hs | 2 | ||||
-rw-r--r-- | src/Network/BitTorrent/Exchange/Session/Status.hs | 2 | ||||
-rw-r--r-- | src/System/Torrent/Storage.hs | 2 | ||||
-rw-r--r-- | tests/Network/BitTorrent/Exchange/BitfieldSpec.hs (renamed from tests/Data/Torrent/BitfieldSpec.hs) | 4 | ||||
-rw-r--r-- | tests/Network/BitTorrent/Exchange/MessageSpec.hs | 2 | ||||
-rw-r--r-- | tests/System/Torrent/StorageSpec.hs | 2 |
11 files changed, 16 insertions, 16 deletions
diff --git a/bittorrent.cabal b/bittorrent.cabal index 6df074bb..cd4c5d38 100644 --- a/bittorrent.cabal +++ b/bittorrent.cabal | |||
@@ -45,7 +45,6 @@ library | |||
45 | , RecordWildCards | 45 | , RecordWildCards |
46 | hs-source-dirs: src | 46 | hs-source-dirs: src |
47 | exposed-modules: Data.Torrent | 47 | exposed-modules: Data.Torrent |
48 | Data.Torrent.Bitfield | ||
49 | Data.Torrent.Progress | 48 | Data.Torrent.Progress |
50 | Data.Torrent.Tree | 49 | Data.Torrent.Tree |
51 | Network.BitTorrent | 50 | Network.BitTorrent |
@@ -62,6 +61,7 @@ library | |||
62 | Network.BitTorrent.DHT.Token | 61 | Network.BitTorrent.DHT.Token |
63 | Network.BitTorrent.Exchange | 62 | Network.BitTorrent.Exchange |
64 | Network.BitTorrent.Exchange.Assembler | 63 | Network.BitTorrent.Exchange.Assembler |
64 | Network.BitTorrent.Exchange.Bitfield | ||
65 | Network.BitTorrent.Exchange.Block | 65 | Network.BitTorrent.Exchange.Block |
66 | Network.BitTorrent.Exchange.Connection | 66 | Network.BitTorrent.Exchange.Connection |
67 | Network.BitTorrent.Exchange.Manager | 67 | Network.BitTorrent.Exchange.Manager |
@@ -173,7 +173,6 @@ test-suite spec | |||
173 | Config | 173 | Config |
174 | 174 | ||
175 | Data.TorrentSpec | 175 | Data.TorrentSpec |
176 | Data.Torrent.BitfieldSpec | ||
177 | Data.Torrent.ProgressSpec | 176 | Data.Torrent.ProgressSpec |
178 | Network.BitTorrent.Client.HandleSpec | 177 | Network.BitTorrent.Client.HandleSpec |
179 | Network.BitTorrent.CoreSpec | 178 | Network.BitTorrent.CoreSpec |
@@ -192,6 +191,7 @@ test-suite spec | |||
192 | Network.BitTorrent.Tracker.RPC.HTTPSpec | 191 | Network.BitTorrent.Tracker.RPC.HTTPSpec |
193 | Network.BitTorrent.Tracker.RPC.UDPSpec | 192 | Network.BitTorrent.Tracker.RPC.UDPSpec |
194 | Network.BitTorrent.Tracker.SessionSpec | 193 | Network.BitTorrent.Tracker.SessionSpec |
194 | Network.BitTorrent.Exchange.BitfieldSpec | ||
195 | Network.BitTorrent.Exchange.ConnectionSpec | 195 | Network.BitTorrent.Exchange.ConnectionSpec |
196 | Network.BitTorrent.Exchange.MessageSpec | 196 | Network.BitTorrent.Exchange.MessageSpec |
197 | Network.BitTorrent.Exchange.SessionSpec | 197 | Network.BitTorrent.Exchange.SessionSpec |
diff --git a/src/Data/Torrent/Bitfield.hs b/src/Network/BitTorrent/Exchange/Bitfield.hs index ff701d75..3f4931f3 100644 --- a/src/Data/Torrent/Bitfield.hs +++ b/src/Network/BitTorrent/Exchange/Bitfield.hs | |||
@@ -27,7 +27,7 @@ | |||
27 | {-# LANGUAGE CPP #-} | 27 | {-# LANGUAGE CPP #-} |
28 | {-# LANGUAGE BangPatterns #-} | 28 | {-# LANGUAGE BangPatterns #-} |
29 | {-# LANGUAGE RecordWildCards #-} | 29 | {-# LANGUAGE RecordWildCards #-} |
30 | module Data.Torrent.Bitfield | 30 | module Network.BitTorrent.Exchange.Bitfield |
31 | ( -- * Bitfield | 31 | ( -- * Bitfield |
32 | PieceIx | 32 | PieceIx |
33 | , PieceCount | 33 | , PieceCount |
@@ -43,8 +43,8 @@ module Data.Torrent.Bitfield | |||
43 | 43 | ||
44 | -- * Query | 44 | -- * Query |
45 | -- ** Cardinality | 45 | -- ** Cardinality |
46 | , Data.Torrent.Bitfield.null | 46 | , Network.BitTorrent.Exchange.Bitfield.null |
47 | , Data.Torrent.Bitfield.full | 47 | , Network.BitTorrent.Exchange.Bitfield.full |
48 | , haveCount | 48 | , haveCount |
49 | , totalCount | 49 | , totalCount |
50 | , completeness | 50 | , completeness |
diff --git a/src/Network/BitTorrent/Exchange/Connection.hs b/src/Network/BitTorrent/Exchange/Connection.hs index 9b7942ae..f208fa54 100644 --- a/src/Network/BitTorrent/Exchange/Connection.hs +++ b/src/Network/BitTorrent/Exchange/Connection.hs | |||
@@ -135,10 +135,10 @@ import Text.Show.Functions () | |||
135 | import System.Log.FastLogger (ToLogStr(..)) | 135 | import System.Log.FastLogger (ToLogStr(..)) |
136 | import System.Timeout | 136 | import System.Timeout |
137 | 137 | ||
138 | import Data.Torrent.Bitfield as BF | ||
139 | import Data.Torrent | 138 | import Data.Torrent |
140 | import Network.BitTorrent.Address | 139 | import Network.BitTorrent.Address |
141 | import Network.BitTorrent.Exchange.Message as Msg | 140 | import Network.BitTorrent.Exchange.Bitfield as BF |
141 | import Network.BitTorrent.Exchange.Message as Msg | ||
142 | 142 | ||
143 | -- TODO handle port message? | 143 | -- TODO handle port message? |
144 | -- TODO handle limits? | 144 | -- TODO handle limits? |
diff --git a/src/Network/BitTorrent/Exchange/Message.hs b/src/Network/BitTorrent/Exchange/Message.hs index a0cb5c91..f8b76186 100644 --- a/src/Network/BitTorrent/Exchange/Message.hs +++ b/src/Network/BitTorrent/Exchange/Message.hs | |||
@@ -117,10 +117,10 @@ import Network.Socket hiding (KeepAlive) | |||
117 | import Text.PrettyPrint as PP hiding ((<>)) | 117 | import Text.PrettyPrint as PP hiding ((<>)) |
118 | import Text.PrettyPrint.Class | 118 | import Text.PrettyPrint.Class |
119 | 119 | ||
120 | import Data.Torrent.Bitfield | ||
121 | import Data.Torrent hiding (Piece (..)) | 120 | import Data.Torrent hiding (Piece (..)) |
122 | import qualified Data.Torrent as P (Piece (..)) | 121 | import qualified Data.Torrent as P (Piece (..)) |
123 | import Network.BitTorrent.Address | 122 | import Network.BitTorrent.Address |
123 | import Network.BitTorrent.Exchange.Bitfield | ||
124 | import Network.BitTorrent.Exchange.Block | 124 | import Network.BitTorrent.Exchange.Block |
125 | 125 | ||
126 | {----------------------------------------------------------------------- | 126 | {----------------------------------------------------------------------- |
diff --git a/src/Network/BitTorrent/Exchange/Selection.hs b/src/Network/BitTorrent/Exchange/Selection.hs index 2724fabc..3701450b 100644 --- a/src/Network/BitTorrent/Exchange/Selection.hs +++ b/src/Network/BitTorrent/Exchange/Selection.hs | |||
@@ -22,7 +22,7 @@ module Network.BitTorrent.Exchange.Selection | |||
22 | 22 | ||
23 | import Data.Ratio | 23 | import Data.Ratio |
24 | 24 | ||
25 | import Data.Torrent.Bitfield | 25 | import Network.BitTorrent.Exchange.Bitfield |
26 | 26 | ||
27 | 27 | ||
28 | type Selector = Bitfield -- ^ Indices of client /have/ pieces. | 28 | type Selector = Bitfield -- ^ Indices of client /have/ pieces. |
diff --git a/src/Network/BitTorrent/Exchange/Session.hs b/src/Network/BitTorrent/Exchange/Session.hs index b68f17a0..4c6811d9 100644 --- a/src/Network/BitTorrent/Exchange/Session.hs +++ b/src/Network/BitTorrent/Exchange/Session.hs | |||
@@ -46,9 +46,9 @@ import System.Log.FastLogger (LogStr, ToLogStr (..)) | |||
46 | 46 | ||
47 | import Data.BEncode as BE | 47 | import Data.BEncode as BE |
48 | import Data.Torrent as Torrent | 48 | import Data.Torrent as Torrent |
49 | import Data.Torrent.Bitfield as BF | ||
50 | import Network.BitTorrent.Internal.Types | 49 | import Network.BitTorrent.Internal.Types |
51 | import Network.BitTorrent.Address | 50 | import Network.BitTorrent.Address |
51 | import Network.BitTorrent.Exchange.Bitfield as BF | ||
52 | import Network.BitTorrent.Exchange.Block as Block | 52 | import Network.BitTorrent.Exchange.Block as Block |
53 | import Network.BitTorrent.Exchange.Connection | 53 | import Network.BitTorrent.Exchange.Connection |
54 | import Network.BitTorrent.Exchange.Message as Message | 54 | import Network.BitTorrent.Exchange.Message as Message |
diff --git a/src/Network/BitTorrent/Exchange/Session/Status.hs b/src/Network/BitTorrent/Exchange/Session/Status.hs index 63b91926..af3e94f5 100644 --- a/src/Network/BitTorrent/Exchange/Session/Status.hs +++ b/src/Network/BitTorrent/Exchange/Session/Status.hs | |||
@@ -29,7 +29,7 @@ import Data.Set as S | |||
29 | import Data.Tuple | 29 | import Data.Tuple |
30 | 30 | ||
31 | import Data.Torrent | 31 | import Data.Torrent |
32 | import Data.Torrent.Bitfield as BF | 32 | import Network.BitTorrent.Exchange.Bitfield as BF |
33 | import Network.BitTorrent.Address | 33 | import Network.BitTorrent.Address |
34 | import Network.BitTorrent.Exchange.Block as Block | 34 | import Network.BitTorrent.Exchange.Block as Block |
35 | import System.Torrent.Storage (Storage, writePiece) | 35 | import System.Torrent.Storage (Storage, writePiece) |
diff --git a/src/System/Torrent/Storage.hs b/src/System/Torrent/Storage.hs index 1123cea9..1d77e55d 100644 --- a/src/System/Torrent/Storage.hs +++ b/src/System/Torrent/Storage.hs | |||
@@ -56,7 +56,7 @@ import Data.Conduit.List as C | |||
56 | import Data.Typeable | 56 | import Data.Typeable |
57 | 57 | ||
58 | import Data.Torrent | 58 | import Data.Torrent |
59 | import Data.Torrent.Bitfield as BF | 59 | import Network.BitTorrent.Exchange.Bitfield as BF |
60 | import System.Torrent.FileMap as FM | 60 | import System.Torrent.FileMap as FM |
61 | 61 | ||
62 | 62 | ||
diff --git a/tests/Data/Torrent/BitfieldSpec.hs b/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs index 093f6f19..234965fa 100644 --- a/tests/Data/Torrent/BitfieldSpec.hs +++ b/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs | |||
@@ -1,10 +1,10 @@ | |||
1 | {-# OPTIONS -fno-warn-orphans #-} | 1 | {-# OPTIONS -fno-warn-orphans #-} |
2 | module Data.Torrent.BitfieldSpec (spec) where | 2 | module Network.BitTorrent.Exchange.BitfieldSpec (spec) where |
3 | import Control.Applicative | 3 | import Control.Applicative |
4 | import Test.Hspec | 4 | import Test.Hspec |
5 | import Test.QuickCheck | 5 | import Test.QuickCheck |
6 | 6 | ||
7 | import Data.Torrent.Bitfield | 7 | import Network.BitTorrent.Exchange.Bitfield |
8 | 8 | ||
9 | instance Arbitrary Bitfield where | 9 | instance Arbitrary Bitfield where |
10 | arbitrary = fromBitmap <$> arbitrary | 10 | arbitrary = fromBitmap <$> arbitrary |
diff --git a/tests/Network/BitTorrent/Exchange/MessageSpec.hs b/tests/Network/BitTorrent/Exchange/MessageSpec.hs index f82b034e..d615b1ff 100644 --- a/tests/Network/BitTorrent/Exchange/MessageSpec.hs +++ b/tests/Network/BitTorrent/Exchange/MessageSpec.hs | |||
@@ -11,7 +11,7 @@ import Test.Hspec | |||
11 | import Test.QuickCheck | 11 | import Test.QuickCheck |
12 | 12 | ||
13 | import Data.TorrentSpec () | 13 | import Data.TorrentSpec () |
14 | import Data.Torrent.BitfieldSpec () | 14 | import Network.BitTorrent.Exchange.BitfieldSpec () |
15 | import Network.BitTorrent.CoreSpec () | 15 | import Network.BitTorrent.CoreSpec () |
16 | import Network.BitTorrent.Address () | 16 | import Network.BitTorrent.Address () |
17 | import Network.BitTorrent.Exchange.BlockSpec () | 17 | import Network.BitTorrent.Exchange.BlockSpec () |
diff --git a/tests/System/Torrent/StorageSpec.hs b/tests/System/Torrent/StorageSpec.hs index 96f1b036..b5e49078 100644 --- a/tests/System/Torrent/StorageSpec.hs +++ b/tests/System/Torrent/StorageSpec.hs | |||
@@ -8,7 +8,7 @@ import System.IO.Unsafe | |||
8 | import Test.Hspec | 8 | import Test.Hspec |
9 | 9 | ||
10 | import Data.Torrent | 10 | import Data.Torrent |
11 | import Data.Torrent.Bitfield as BF | 11 | import Network.BitTorrent.Exchange.Bitfield as BF |
12 | import System.Torrent.Storage | 12 | import System.Torrent.Storage |
13 | 13 | ||
14 | 14 | ||