summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Core/PeerId.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-11-23 03:37:15 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-11-23 03:37:15 +0400
commited25a297094b483dce06e14d52ced2f93f6dca41 (patch)
tree3df60d8b30af29345de021f251903a175e78c70c /src/Network/BitTorrent/Core/PeerId.hs
parent708938679954a5d5f9def82e1fa873c19ed662df (diff)
Use pretty-class package
Diffstat (limited to 'src/Network/BitTorrent/Core/PeerId.hs')
-rw-r--r--src/Network/BitTorrent/Core/PeerId.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Core/PeerId.hs b/src/Network/BitTorrent/Core/PeerId.hs
index a212df3d..6aebe8d4 100644
--- a/src/Network/BitTorrent/Core/PeerId.hs
+++ b/src/Network/BitTorrent/Core/PeerId.hs
@@ -16,7 +16,6 @@
16module Network.BitTorrent.Core.PeerId 16module Network.BitTorrent.Core.PeerId
17 ( -- * PeerId 17 ( -- * PeerId
18 PeerId (getPeerId) 18 PeerId (getPeerId)
19 , ppPeerId
20 19
21 -- * Generation 20 -- * Generation
22 , genPeerId 21 , genPeerId
@@ -57,6 +56,7 @@ import Data.Version (Version(Version), versionBranch)
57import System.Entropy (getEntropy) 56import System.Entropy (getEntropy)
58import System.Locale (defaultTimeLocale) 57import System.Locale (defaultTimeLocale)
59import Text.PrettyPrint hiding ((<>)) 58import Text.PrettyPrint hiding ((<>))
59import Text.PrettyPrint.Class
60import Text.Read (readMaybe) 60import Text.Read (readMaybe)
61import Paths_bittorrent (version) 61import Paths_bittorrent (version)
62 62
@@ -83,9 +83,8 @@ instance IsString PeerId where
83 where 83 where
84 bs = fromString str 84 bs = fromString str
85 85
86-- | Format peer id in human readable form. 86instance Pretty PeerId where
87ppPeerId :: PeerId -> Doc 87 pretty = text . BC.unpack . getPeerId
88ppPeerId = text . BC.unpack . getPeerId
89 88
90{----------------------------------------------------------------------- 89{-----------------------------------------------------------------------
91-- Encoding 90-- Encoding