summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Data/Torrent/Layout.hs4
-rw-r--r--src/Network/BitTorrent/Exchange/Block.hs (renamed from src/Data/Torrent/Block.hs)2
-rw-r--r--src/Network/BitTorrent/Exchange/Message.hs2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/Data/Torrent/Layout.hs b/src/Data/Torrent/Layout.hs
index 7ed8679d..a32d74fa 100644
--- a/src/Data/Torrent/Layout.hs
+++ b/src/Data/Torrent/Layout.hs
@@ -81,8 +81,6 @@ import Text.PrettyPrint.Class
81import System.FilePath 81import System.FilePath
82import System.Posix.Types 82import System.Posix.Types
83 83
84import Data.Torrent.Block
85
86 84
87{----------------------------------------------------------------------- 85{-----------------------------------------------------------------------
88-- File attribytes 86-- File attribytes
@@ -274,7 +272,7 @@ fileCount MultiFile {..} = L.length liFiles
274 272
275-- | Find number of blocks of the specified size. If torrent size is 273-- | Find number of blocks of the specified size. If torrent size is
276-- not a multiple of block size then the count is rounded up. 274-- not a multiple of block size then the count is rounded up.
277blockCount :: BlockSize -> LayoutInfo -> Int 275blockCount :: Int -> LayoutInfo -> Int
278blockCount blkSize ci = contentLength ci `sizeInBase` blkSize 276blockCount blkSize ci = contentLength ci `sizeInBase` blkSize
279 277
280{----------------------------------------------------------------------- 278{-----------------------------------------------------------------------
diff --git a/src/Data/Torrent/Block.hs b/src/Network/BitTorrent/Exchange/Block.hs
index 88f7f352..e99dd49d 100644
--- a/src/Data/Torrent/Block.hs
+++ b/src/Network/BitTorrent/Exchange/Block.hs
@@ -12,7 +12,7 @@
12{-# LANGUAGE DeriveFunctor #-} 12{-# LANGUAGE DeriveFunctor #-}
13{-# LANGUAGE DeriveDataTypeable #-} 13{-# LANGUAGE DeriveDataTypeable #-}
14{-# LANGUAGE GeneralizedNewtypeDeriving #-} 14{-# LANGUAGE GeneralizedNewtypeDeriving #-}
15module Data.Torrent.Block 15module Network.BitTorrent.Exchange.Block
16 ( -- * Block attributes 16 ( -- * Block attributes
17 BlockOffset 17 BlockOffset
18 , BlockCount 18 , BlockCount
diff --git a/src/Network/BitTorrent/Exchange/Message.hs b/src/Network/BitTorrent/Exchange/Message.hs
index 2f85d729..8a88b761 100644
--- a/src/Network/BitTorrent/Exchange/Message.hs
+++ b/src/Network/BitTorrent/Exchange/Message.hs
@@ -90,10 +90,10 @@ import Text.PrettyPrint as PP
90import Text.PrettyPrint.Class 90import Text.PrettyPrint.Class
91 91
92import Data.Torrent.Bitfield 92import Data.Torrent.Bitfield
93import Data.Torrent.Block
94import Data.Torrent.InfoHash 93import Data.Torrent.InfoHash
95import Network.BitTorrent.Core.PeerId 94import Network.BitTorrent.Core.PeerId
96import Network.BitTorrent.Core.PeerAddr () 95import Network.BitTorrent.Core.PeerAddr ()
96import Network.BitTorrent.Exchange.Block
97 97
98{----------------------------------------------------------------------- 98{-----------------------------------------------------------------------
99-- Extensions 99-- Extensions