diff options
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r-- | src/Network/BitTorrent/Core/PeerAddr.hs | 2 | ||||
-rw-r--r-- | src/Network/BitTorrent/Exchange/Status.hs | 2 | ||||
-rw-r--r-- | src/Network/BitTorrent/Tracker/RPC/Message.hs | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/Network/BitTorrent/Core/PeerAddr.hs b/src/Network/BitTorrent/Core/PeerAddr.hs index e58aaa89..ed2dc672 100644 --- a/src/Network/BitTorrent/Core/PeerAddr.hs +++ b/src/Network/BitTorrent/Core/PeerAddr.hs | |||
@@ -62,7 +62,7 @@ data PeerAddr = PeerAddr { | |||
62 | , peerPort :: {-# UNPACK #-} !PortNumber | 62 | , peerPort :: {-# UNPACK #-} !PortNumber |
63 | } deriving (Show, Eq, Ord, Typeable) | 63 | } deriving (Show, Eq, Ord, Typeable) |
64 | 64 | ||
65 | $(deriveJSON (L.map toLower . L.dropWhile isLower) ''PeerAddr) | 65 | $(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''PeerAddr) |
66 | 66 | ||
67 | -- | The tracker "announce query" compatible encoding. | 67 | -- | The tracker "announce query" compatible encoding. |
68 | instance BEncode PeerAddr where | 68 | instance BEncode PeerAddr where |
diff --git a/src/Network/BitTorrent/Exchange/Status.hs b/src/Network/BitTorrent/Exchange/Status.hs index 7920f2a1..03a71bbe 100644 --- a/src/Network/BitTorrent/Exchange/Status.hs +++ b/src/Network/BitTorrent/Exchange/Status.hs | |||
@@ -35,7 +35,7 @@ data PeerStatus = PeerStatus { | |||
35 | } deriving (Show, Eq) | 35 | } deriving (Show, Eq) |
36 | 36 | ||
37 | $(makeLenses ''PeerStatus) | 37 | $(makeLenses ''PeerStatus) |
38 | $(deriveJSON L.tail ''PeerStatus) | 38 | $(deriveJSON defaultOptions { fieldLabelModifier = L.tail } ''PeerStatus) |
39 | 39 | ||
40 | instance Default PeerStatus where | 40 | instance Default PeerStatus where |
41 | def = PeerStatus True False | 41 | def = PeerStatus True False |
diff --git a/src/Network/BitTorrent/Tracker/RPC/Message.hs b/src/Network/BitTorrent/Tracker/RPC/Message.hs index cec68169..213f1e83 100644 --- a/src/Network/BitTorrent/Tracker/RPC/Message.hs +++ b/src/Network/BitTorrent/Tracker/RPC/Message.hs | |||
@@ -93,7 +93,7 @@ data Event = Started | |||
93 | -- ^ To be sent when the peer completes a download. | 93 | -- ^ To be sent when the peer completes a download. |
94 | deriving (Show, Read, Eq, Ord, Enum, Bounded, Typeable) | 94 | deriving (Show, Read, Eq, Ord, Enum, Bounded, Typeable) |
95 | 95 | ||
96 | $(deriveJSON (L.map toLower . L.dropWhile isLower) ''Event) | 96 | $(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''Event) |
97 | 97 | ||
98 | -- | HTTP tracker protocol compatible encoding. | 98 | -- | HTTP tracker protocol compatible encoding. |
99 | instance QueryValueLike Event where | 99 | instance QueryValueLike Event where |
@@ -163,7 +163,7 @@ data AnnounceQuery = AnnounceQuery | |||
163 | , reqEvent :: Maybe Event | 163 | , reqEvent :: Maybe Event |
164 | } deriving (Show, Eq, Typeable) | 164 | } deriving (Show, Eq, Typeable) |
165 | 165 | ||
166 | $(deriveJSON (L.map toLower . L.dropWhile isLower) ''AnnounceQuery) | 166 | $(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''AnnounceQuery) |
167 | 167 | ||
168 | -- | UDP tracker protocol compatible encoding. | 168 | -- | UDP tracker protocol compatible encoding. |
169 | instance Serialize AnnounceQuery where | 169 | instance Serialize AnnounceQuery where |
@@ -386,7 +386,7 @@ data AnnounceInfo = | |||
386 | , respWarning :: !(Maybe Text) | 386 | , respWarning :: !(Maybe Text) |
387 | } deriving (Show, Typeable) | 387 | } deriving (Show, Typeable) |
388 | 388 | ||
389 | $(deriveJSON (L.map toLower . L.dropWhile isLower) ''AnnounceInfo) | 389 | $(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''AnnounceInfo) |
390 | 390 | ||
391 | -- | HTTP tracker protocol compatible encoding. | 391 | -- | HTTP tracker protocol compatible encoding. |
392 | instance BEncode AnnounceInfo where | 392 | instance BEncode AnnounceInfo where |
@@ -524,7 +524,7 @@ data ScrapeEntry = ScrapeEntry { | |||
524 | , siName :: !(Maybe Text) | 524 | , siName :: !(Maybe Text) |
525 | } deriving (Show, Eq, Typeable) | 525 | } deriving (Show, Eq, Typeable) |
526 | 526 | ||
527 | $(deriveJSON (L.map toLower . L.dropWhile isLower) ''ScrapeEntry) | 527 | $(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''ScrapeEntry) |
528 | 528 | ||
529 | -- | HTTP tracker protocol compatible encoding. | 529 | -- | HTTP tracker protocol compatible encoding. |
530 | instance BEncode ScrapeEntry where | 530 | instance BEncode ScrapeEntry where |