summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Data/Torrent.hs2
-rw-r--r--src/Network/BitTorrent/PeerWire/Block.hs12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs
index 35bed5f2..c3753d4f 100644
--- a/src/Data/Torrent.hs
+++ b/src/Data/Torrent.hs
@@ -5,9 +5,9 @@
5-- Stability : experimental 5-- Stability : experimental
6-- Portability : portable 6-- Portability : portable
7-- 7--
8-- This module provides torrent metainfo serialization.
8{-# OPTIONS -fno-warn-orphans #-} 9{-# OPTIONS -fno-warn-orphans #-}
9{-# LANGUAGE OverloadedStrings #-} 10{-# LANGUAGE OverloadedStrings #-}
10-- | This module provides torrent metainfo serialization.
11module Data.Torrent 11module Data.Torrent
12 ( module Data.Torrent.InfoHash 12 ( module Data.Torrent.InfoHash
13 , Torrent(..), ContentInfo(..), FileInfo(..) 13 , Torrent(..), ContentInfo(..), FileInfo(..)
diff --git a/src/Network/BitTorrent/PeerWire/Block.hs b/src/Network/BitTorrent/PeerWire/Block.hs
index 9685a4fb..582accdb 100644
--- a/src/Network/BitTorrent/PeerWire/Block.hs
+++ b/src/Network/BitTorrent/PeerWire/Block.hs
@@ -21,13 +21,13 @@ type PieceLIx = Int
21type PieceIx = Int 21type PieceIx = Int
22 22
23data BlockIx = BlockIx { 23data BlockIx = BlockIx {
24 -- ^ Zero-based piece index. 24 -- | Zero-based piece index.
25 ixPiece :: {-# UNPACK #-} !PieceLIx 25 ixPiece :: {-# UNPACK #-} !PieceLIx
26 26
27 -- ^ Zero-based byte offset within the piece. 27 -- | Zero-based byte offset within the piece.
28 , ixOffset :: {-# UNPACK #-} !Int 28 , ixOffset :: {-# UNPACK #-} !Int
29 29
30 -- ^ Block size starting from offset. 30 -- | Block size starting from offset.
31 , ixLength :: {-# UNPACK #-} !Int 31 , ixLength :: {-# UNPACK #-} !Int
32 } deriving (Show, Eq) 32 } deriving (Show, Eq)
33 33
@@ -55,13 +55,13 @@ ppBlockIx ix = "piece = " ++ show (ixPiece ix) ++ ", "
55 ++ "length = " ++ show (ixLength ix) 55 ++ "length = " ++ show (ixLength ix)
56 56
57data Block = Block { 57data Block = Block {
58 -- ^ Zero-based piece index. 58 -- | Zero-based piece index.
59 blkPiece :: PieceLIx 59 blkPiece :: PieceLIx
60 60
61 -- ^ Zero-based byte offset within the piece. 61 -- | Zero-based byte offset within the piece.
62 , blkOffset :: Int 62 , blkOffset :: Int
63 63
64 -- ^ Payload. 64 -- | Payload.
65 , blkData :: ByteString 65 , blkData :: ByteString
66 } deriving (Show, Eq) 66 } deriving (Show, Eq)
67 67