summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Core.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Core.hs')
-rw-r--r--src/Network/BitTorrent/Core.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Core.hs b/src/Network/BitTorrent/Core.hs
index 6024f5a5..2ddee517 100644
--- a/src/Network/BitTorrent/Core.hs
+++ b/src/Network/BitTorrent/Core.hs
@@ -20,8 +20,11 @@ module Network.BitTorrent.Core
20import Control.Applicative 20import Control.Applicative
21import Data.IP 21import Data.IP
22import Data.Serialize 22import Data.Serialize
23import Data.Time
23import Data.Typeable 24import Data.Typeable
24import Network.Socket (SockAddr (..), PortNumber) 25import Network.Socket (SockAddr (..), PortNumber)
26import Text.PrettyPrint as PP hiding ((<>))
27import Text.PrettyPrint.Class
25 28
26import Network.BitTorrent.Core.Fingerprint as Core 29import Network.BitTorrent.Core.Fingerprint as Core
27import Network.BitTorrent.Core.Node as Core 30import Network.BitTorrent.Core.Node as Core
@@ -29,7 +32,10 @@ import Network.BitTorrent.Core.PeerId as Core
29import Network.BitTorrent.Core.PeerAddr as Core 32import Network.BitTorrent.Core.PeerAddr as Core
30 33
31 34
32class (Eq a, Serialize a, Typeable a) => Address a where 35instance Pretty UTCTime where
36 pretty = PP.text . show
37
38class (Eq a, Serialize a, Typeable a, Pretty a) => Address a where
33 toSockAddr :: a -> SockAddr 39 toSockAddr :: a -> SockAddr
34 fromSockAddr :: SockAddr -> Maybe a 40 fromSockAddr :: SockAddr -> Maybe a
35 41