diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-06-02 06:43:00 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-06-02 06:43:00 +0400 |
commit | 4de96724e4006589022e08b6ed247784f958b508 (patch) | |
tree | 7c7807a4e9425fca1151e1fed909a3643238278f /src/Network/BitTorrent/Peer/ID.hs | |
parent | dea6c9b2ea1037ee54f1908ebc6a5e193e0cfac6 (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.hs | 5 |
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 | |||
44 | import Data.Version (Version(Version), versionBranch) | 44 | import Data.Version (Version(Version), versionBranch) |
45 | import Data.Time.Clock (getCurrentTime) | 45 | import Data.Time.Clock (getCurrentTime) |
46 | import Data.Time.Format (formatTime) | 46 | import Data.Time.Format (formatTime) |
47 | import Text.PrettyPrint (text, Doc) | ||
47 | import System.Locale (defaultTimeLocale) | 48 | import System.Locale (defaultTimeLocale) |
48 | 49 | ||
49 | 50 | ||
@@ -64,8 +65,8 @@ instance Serialize PeerID where | |||
64 | instance URLShow PeerID where | 65 | instance URLShow PeerID where |
65 | urlShow = BC.unpack . getPeerID | 66 | urlShow = BC.unpack . getPeerID |
66 | 67 | ||
67 | ppPeerID :: PeerID -> String | 68 | ppPeerID :: PeerID -> Doc |
68 | ppPeerID = BC.unpack . getPeerID | 69 | ppPeerID = text . BC.unpack . getPeerID |
69 | 70 | ||
70 | 71 | ||
71 | -- | Azureus-style encoding have the following layout: | 72 | -- | Azureus-style encoding have the following layout: |