summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Core/PeerAddr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Core/PeerAddr.hs')
-rw-r--r--src/Network/BitTorrent/Core/PeerAddr.hs3
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
41import Text.Read (readMaybe) 41import Text.Read (readMaybe)
42import System.IO.Unsafe 42import System.IO.Unsafe
43 43
44import Data.Torrent.JSON
44import Network.BitTorrent.Core.PeerId 45import 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
73peer_id_key, peer_ip_key, peer_port_key :: BKey 74peer_id_key, peer_ip_key, peer_port_key :: BKey
74peer_id_key = "peer id" 75peer_id_key = "peer id"