diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Data/Torrent.hs | 10 | ||||
-rw-r--r-- | src/Network/BitTorrent/Peer.hs | 2 |
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 | |||
65 | import Data.ByteString (ByteString) | 65 | import Data.ByteString (ByteString) |
66 | import qualified Data.ByteString as B | 66 | import qualified Data.ByteString as B |
67 | import qualified Data.ByteString.Char8 as BC (pack, unpack) | 67 | import qualified Data.ByteString.Char8 as BC (pack, unpack) |
68 | import qualified Data.ByteString.Builder as B | ||
69 | import qualified Data.ByteString.Builder.Prim as B | ||
70 | import qualified Data.ByteString.Lazy as Lazy | 68 | import qualified Data.ByteString.Lazy as Lazy |
69 | import qualified Data.ByteString.Lazy.Builder as B | ||
70 | import qualified Data.ByteString.Lazy.Builder.ASCII as B | ||
71 | import qualified Data.List as L | 71 | import qualified Data.List as L |
72 | import Data.Text (Text) | 72 | import Data.Text (Text) |
73 | import Data.Serialize as S hiding (Result) | 73 | import 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. |
403 | ppInfoHash :: InfoHash -> Doc | 403 | ppInfoHash :: InfoHash -> Doc |
404 | ppInfoHash = text . BC.unpack . Lazy.toStrict . ppHex . getInfoHash | 404 | ppInfoHash = text . BC.unpack . ppHex . getInfoHash |
405 | 405 | ||
406 | ppHex :: ByteString -> Lazy.ByteString | 406 | ppHex :: ByteString -> ByteString |
407 | ppHex = B.toLazyByteString . foldMap (B.primFixed B.word8HexFixed) . B.unpack | 407 | ppHex = 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) | |||
77 | import qualified Data.ByteString as B | 77 | import qualified Data.ByteString as B |
78 | import qualified Data.ByteString.Char8 as BC | 78 | import qualified Data.ByteString.Char8 as BC |
79 | import qualified Data.ByteString.Lazy as BL | 79 | import qualified Data.ByteString.Lazy as BL |
80 | import qualified Data.ByteString.Builder as B | 80 | import qualified Data.ByteString.Lazy.Builder as B |
81 | import Data.Foldable (foldMap) | 81 | import Data.Foldable (foldMap) |
82 | import Data.Monoid ((<>)) | 82 | import Data.Monoid ((<>)) |
83 | import Data.Serialize | 83 | import Data.Serialize |