summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bittorrent.cabal4
-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.hs4
-rw-r--r--src/Network/BitTorrent/Exchange/Message.hs2
-rw-r--r--src/Network/BitTorrent/Exchange/Selection.hs2
-rw-r--r--src/Network/BitTorrent/Exchange/Session.hs2
-rw-r--r--src/Network/BitTorrent/Exchange/Session/Status.hs2
-rw-r--r--src/System/Torrent/Storage.hs2
-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.hs2
-rw-r--r--tests/System/Torrent/StorageSpec.hs2
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 #-}
30module Data.Torrent.Bitfield 30module 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 ()
135import System.Log.FastLogger (ToLogStr(..)) 135import System.Log.FastLogger (ToLogStr(..))
136import System.Timeout 136import System.Timeout
137 137
138import Data.Torrent.Bitfield as BF
139import Data.Torrent 138import Data.Torrent
140import Network.BitTorrent.Address 139import Network.BitTorrent.Address
141import Network.BitTorrent.Exchange.Message as Msg 140import Network.BitTorrent.Exchange.Bitfield as BF
141import 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)
117import Text.PrettyPrint as PP hiding ((<>)) 117import Text.PrettyPrint as PP hiding ((<>))
118import Text.PrettyPrint.Class 118import Text.PrettyPrint.Class
119 119
120import Data.Torrent.Bitfield
121import Data.Torrent hiding (Piece (..)) 120import Data.Torrent hiding (Piece (..))
122import qualified Data.Torrent as P (Piece (..)) 121import qualified Data.Torrent as P (Piece (..))
123import Network.BitTorrent.Address 122import Network.BitTorrent.Address
123import Network.BitTorrent.Exchange.Bitfield
124import Network.BitTorrent.Exchange.Block 124import 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
23import Data.Ratio 23import Data.Ratio
24 24
25import Data.Torrent.Bitfield 25import Network.BitTorrent.Exchange.Bitfield
26 26
27 27
28type Selector = Bitfield -- ^ Indices of client /have/ pieces. 28type 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
47import Data.BEncode as BE 47import Data.BEncode as BE
48import Data.Torrent as Torrent 48import Data.Torrent as Torrent
49import Data.Torrent.Bitfield as BF
50import Network.BitTorrent.Internal.Types 49import Network.BitTorrent.Internal.Types
51import Network.BitTorrent.Address 50import Network.BitTorrent.Address
51import Network.BitTorrent.Exchange.Bitfield as BF
52import Network.BitTorrent.Exchange.Block as Block 52import Network.BitTorrent.Exchange.Block as Block
53import Network.BitTorrent.Exchange.Connection 53import Network.BitTorrent.Exchange.Connection
54import Network.BitTorrent.Exchange.Message as Message 54import 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
29import Data.Tuple 29import Data.Tuple
30 30
31import Data.Torrent 31import Data.Torrent
32import Data.Torrent.Bitfield as BF 32import Network.BitTorrent.Exchange.Bitfield as BF
33import Network.BitTorrent.Address 33import Network.BitTorrent.Address
34import Network.BitTorrent.Exchange.Block as Block 34import Network.BitTorrent.Exchange.Block as Block
35import System.Torrent.Storage (Storage, writePiece) 35import 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
56import Data.Typeable 56import Data.Typeable
57 57
58import Data.Torrent 58import Data.Torrent
59import Data.Torrent.Bitfield as BF 59import Network.BitTorrent.Exchange.Bitfield as BF
60import System.Torrent.FileMap as FM 60import 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 #-}
2module Data.Torrent.BitfieldSpec (spec) where 2module Network.BitTorrent.Exchange.BitfieldSpec (spec) where
3import Control.Applicative 3import Control.Applicative
4import Test.Hspec 4import Test.Hspec
5import Test.QuickCheck 5import Test.QuickCheck
6 6
7import Data.Torrent.Bitfield 7import Network.BitTorrent.Exchange.Bitfield
8 8
9instance Arbitrary Bitfield where 9instance 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
11import Test.QuickCheck 11import Test.QuickCheck
12 12
13import Data.TorrentSpec () 13import Data.TorrentSpec ()
14import Data.Torrent.BitfieldSpec () 14import Network.BitTorrent.Exchange.BitfieldSpec ()
15import Network.BitTorrent.CoreSpec () 15import Network.BitTorrent.CoreSpec ()
16import Network.BitTorrent.Address () 16import Network.BitTorrent.Address ()
17import Network.BitTorrent.Exchange.BlockSpec () 17import 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
8import Test.Hspec 8import Test.Hspec
9 9
10import Data.Torrent 10import Data.Torrent
11import Data.Torrent.Bitfield as BF 11import Network.BitTorrent.Exchange.Bitfield as BF
12import System.Torrent.Storage 12import System.Torrent.Storage
13 13
14 14