summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Data/Torrent.hs10
-rw-r--r--src/Network/BitTorrent/Peer.hs2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs
index 1af8ece2..368ec77c 100644
--- a/src/Data/Torrent.hs
+++ b/src/Data/Torrent.hs
@@ -65,9 +65,9 @@ import qualified Data.Map as M
65import Data.ByteString (ByteString) 65import Data.ByteString (ByteString)
66import qualified Data.ByteString as B 66import qualified Data.ByteString as B
67import qualified Data.ByteString.Char8 as BC (pack, unpack) 67import qualified Data.ByteString.Char8 as BC (pack, unpack)
68import qualified Data.ByteString.Builder as B
69import qualified Data.ByteString.Builder.Prim as B
70import qualified Data.ByteString.Lazy as Lazy 68import qualified Data.ByteString.Lazy as Lazy
69import qualified Data.ByteString.Lazy.Builder as B
70import qualified Data.ByteString.Lazy.Builder.ASCII as B
71import qualified Data.List as L 71import qualified Data.List as L
72import Data.Text (Text) 72import Data.Text (Text)
73import Data.Serialize as S hiding (Result) 73import Data.Serialize as S hiding (Result)
@@ -401,10 +401,10 @@ hashlazy = InfoHash . C.hashlazy
401 401
402-- | Pretty print info hash in hexadecimal format. 402-- | Pretty print info hash in hexadecimal format.
403ppInfoHash :: InfoHash -> Doc 403ppInfoHash :: InfoHash -> Doc
404ppInfoHash = text . BC.unpack . Lazy.toStrict . ppHex . getInfoHash 404ppInfoHash = text . BC.unpack . ppHex . getInfoHash
405 405
406ppHex :: ByteString -> Lazy.ByteString 406ppHex :: ByteString -> ByteString
407ppHex = B.toLazyByteString . foldMap (B.primFixed B.word8HexFixed) . B.unpack 407ppHex = Lazy.toStrict . B.toLazyByteString . B.byteStringHexFixed
408 408
409-- | Add query info hash parameter to uri. 409-- | Add query info hash parameter to uri.
410-- 410--
diff --git a/src/Network/BitTorrent/Peer.hs b/src/Network/BitTorrent/Peer.hs
index 41630c6d..80f47eac 100644
--- a/src/Network/BitTorrent/Peer.hs
+++ b/src/Network/BitTorrent/Peer.hs
@@ -77,7 +77,7 @@ import Data.ByteString (ByteString)
77import qualified Data.ByteString as B 77import qualified Data.ByteString as B
78import qualified Data.ByteString.Char8 as BC 78import qualified Data.ByteString.Char8 as BC
79import qualified Data.ByteString.Lazy as BL 79import qualified Data.ByteString.Lazy as BL
80import qualified Data.ByteString.Builder as B 80import qualified Data.ByteString.Lazy.Builder as B
81import Data.Foldable (foldMap) 81import Data.Foldable (foldMap)
82import Data.Monoid ((<>)) 82import Data.Monoid ((<>))
83import Data.Serialize 83import Data.Serialize