summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Tracker')
-rw-r--r--src/Network/BitTorrent/Tracker/Message.hs8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/Network/BitTorrent/Tracker/Message.hs b/src/Network/BitTorrent/Tracker/Message.hs
index fe7686cb..6249cdc4 100644
--- a/src/Network/BitTorrent/Tracker/Message.hs
+++ b/src/Network/BitTorrent/Tracker/Message.hs
@@ -436,12 +436,6 @@ data PeerList
436 | CompactPeerList { getPeerList :: [PeerAddr] } 436 | CompactPeerList { getPeerList :: [PeerAddr] }
437 deriving (Show, Eq, Typeable) 437 deriving (Show, Eq, Typeable)
438 438
439instance ToJSON PeerList where
440 toJSON = toJSON . getPeerList
441
442instance FromJSON PeerList where
443 parseJSON v = PeerList <$> parseJSON v
444
445putCompactPeerList :: S.Putter [PeerAddr] 439putCompactPeerList :: S.Putter [PeerAddr]
446putCompactPeerList = mapM_ put 440putCompactPeerList = mapM_ put
447 441
@@ -485,8 +479,6 @@ data AnnounceInfo =
485 , respWarning :: !(Maybe Text) 479 , respWarning :: !(Maybe Text)
486 } deriving (Show, Typeable) 480 } deriving (Show, Typeable)
487 481
488$(deriveJSON omitRecordPrefix ''AnnounceInfo)
489
490-- | HTTP tracker protocol compatible encoding. 482-- | HTTP tracker protocol compatible encoding.
491instance BEncode AnnounceInfo where 483instance BEncode AnnounceInfo where
492 toBEncode (Failure t) = toDict $ 484 toBEncode (Failure t) = toDict $