diff options
Diffstat (limited to 'src/Network/BitTorrent/Core/PeerAddr.hs')
-rw-r--r-- | src/Network/BitTorrent/Core/PeerAddr.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/Core/PeerAddr.hs b/src/Network/BitTorrent/Core/PeerAddr.hs index 846a14f9..e7a4ea61 100644 --- a/src/Network/BitTorrent/Core/PeerAddr.hs +++ b/src/Network/BitTorrent/Core/PeerAddr.hs | |||
@@ -41,6 +41,7 @@ import Text.PrettyPrint.Class | |||
41 | import Text.Read (readMaybe) | 41 | import Text.Read (readMaybe) |
42 | import System.IO.Unsafe | 42 | import System.IO.Unsafe |
43 | 43 | ||
44 | import Data.Torrent.JSON | ||
44 | import Network.BitTorrent.Core.PeerId | 45 | import Network.BitTorrent.Core.PeerId |
45 | 46 | ||
46 | 47 | ||
@@ -68,7 +69,7 @@ data PeerAddr = PeerAddr | |||
68 | , peerPort :: {-# UNPACK #-} !PortNumber | 69 | , peerPort :: {-# UNPACK #-} !PortNumber |
69 | } deriving (Show, Eq, Ord, Typeable) | 70 | } deriving (Show, Eq, Ord, Typeable) |
70 | 71 | ||
71 | $(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''PeerAddr) | 72 | $(deriveJSON omitRecordPrefix ''PeerAddr) |
72 | 73 | ||
73 | peer_id_key, peer_ip_key, peer_port_key :: BKey | 74 | peer_id_key, peer_ip_key, peer_port_key :: BKey |
74 | peer_id_key = "peer id" | 75 | peer_id_key = "peer id" |