diff options
Diffstat (limited to 'src/Network/BitTorrent/Core.hs')
-rw-r--r-- | src/Network/BitTorrent/Core.hs | 8 |
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 | |||
20 | import Control.Applicative | 20 | import Control.Applicative |
21 | import Data.IP | 21 | import Data.IP |
22 | import Data.Serialize | 22 | import Data.Serialize |
23 | import Data.Time | ||
23 | import Data.Typeable | 24 | import Data.Typeable |
24 | import Network.Socket (SockAddr (..), PortNumber) | 25 | import Network.Socket (SockAddr (..), PortNumber) |
26 | import Text.PrettyPrint as PP hiding ((<>)) | ||
27 | import Text.PrettyPrint.Class | ||
25 | 28 | ||
26 | import Network.BitTorrent.Core.Fingerprint as Core | 29 | import Network.BitTorrent.Core.Fingerprint as Core |
27 | import Network.BitTorrent.Core.Node as Core | 30 | import Network.BitTorrent.Core.Node as Core |
@@ -29,7 +32,10 @@ import Network.BitTorrent.Core.PeerId as Core | |||
29 | import Network.BitTorrent.Core.PeerAddr as Core | 32 | import Network.BitTorrent.Core.PeerAddr as Core |
30 | 33 | ||
31 | 34 | ||
32 | class (Eq a, Serialize a, Typeable a) => Address a where | 35 | instance Pretty UTCTime where |
36 | pretty = PP.text . show | ||
37 | |||
38 | class (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 | ||