summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Peer/ID.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-06-02 06:43:00 +0400
committerSam T <pxqr.sta@gmail.com>2013-06-02 06:43:00 +0400
commit4de96724e4006589022e08b6ed247784f958b508 (patch)
tree7c7807a4e9425fca1151e1fed909a3643238278f /src/Network/BitTorrent/Peer/ID.hs
parentdea6c9b2ea1037ee54f1908ebc6a5e193e0cfac6 (diff)
~ Use pretty package for pretty print.
This is a bit faster and pretty!
Diffstat (limited to 'src/Network/BitTorrent/Peer/ID.hs')
-rw-r--r--src/Network/BitTorrent/Peer/ID.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/Peer/ID.hs b/src/Network/BitTorrent/Peer/ID.hs
index f93409ed..9bf0ae31 100644
--- a/src/Network/BitTorrent/Peer/ID.hs
+++ b/src/Network/BitTorrent/Peer/ID.hs
@@ -44,6 +44,7 @@ import Data.URLEncoded
44import Data.Version (Version(Version), versionBranch) 44import Data.Version (Version(Version), versionBranch)
45import Data.Time.Clock (getCurrentTime) 45import Data.Time.Clock (getCurrentTime)
46import Data.Time.Format (formatTime) 46import Data.Time.Format (formatTime)
47import Text.PrettyPrint (text, Doc)
47import System.Locale (defaultTimeLocale) 48import System.Locale (defaultTimeLocale)
48 49
49 50
@@ -64,8 +65,8 @@ instance Serialize PeerID where
64instance URLShow PeerID where 65instance URLShow PeerID where
65 urlShow = BC.unpack . getPeerID 66 urlShow = BC.unpack . getPeerID
66 67
67ppPeerID :: PeerID -> String 68ppPeerID :: PeerID -> Doc
68ppPeerID = BC.unpack . getPeerID 69ppPeerID = text . BC.unpack . getPeerID
69 70
70 71
71-- | Azureus-style encoding have the following layout: 72-- | Azureus-style encoding have the following layout: