summaryrefslogtreecommitdiff
path: root/src/Data/Torrent.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2013-12-01 21:12:40 +0100
committerDaniel Gröber <dxld@darkboxed.org>2013-12-01 21:12:40 +0100
commitb83c5d53be21c03004ebb65d1dc9fe1f841a2a3c (patch)
tree12d58df47e8b1a52173c72e97d29d3b8046fa309 /src/Data/Torrent.hs
parent2749007675a6ff28979fa793b48ffe910635c708 (diff)
Fix building with aeson >= 0.6.2.0
deriveJSON now takes an Option record instead of a single function. It might be nicer to define a function that takes the fieldLabelModifier function rather than doing it inline everywhere but I didn't know where a good place to put that would be.
Diffstat (limited to 'src/Data/Torrent.hs')
-rw-r--r--src/Data/Torrent.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs
index b3ac7586..7469d621 100644
--- a/src/Data/Torrent.hs
+++ b/src/Data/Torrent.hs
@@ -123,7 +123,7 @@ data InfoDict = InfoDict
123 -- BEP 27: <http://www.bittorrent.org/beps/bep_0027.html> 123 -- BEP 27: <http://www.bittorrent.org/beps/bep_0027.html>
124 } deriving (Show, Read, Eq, Typeable) 124 } deriving (Show, Read, Eq, Typeable)
125 125
126$(deriveJSON (L.map Char.toLower . L.dropWhile isLower) ''InfoDict) 126$(deriveJSON defaultOptions { fieldLabelModifier = (L.map Char.toLower . L.dropWhile isLower) } ''InfoDict)
127 127
128makeLensesFor 128makeLensesFor
129 [ ("idInfoHash" , "infohash" ) 129 [ ("idInfoHash" , "infohash" )
@@ -239,7 +239,7 @@ instance ToJSON NominalDiffTime where
239instance FromJSON NominalDiffTime where 239instance FromJSON NominalDiffTime where
240 parseJSON v = utcTimeToPOSIXSeconds <$> parseJSON v 240 parseJSON v = utcTimeToPOSIXSeconds <$> parseJSON v
241 241
242$(deriveJSON (L.map Char.toLower . L.dropWhile isLower) ''Torrent) 242$(deriveJSON defaultOptions { fieldLabelModifier = (L.map Char.toLower . L.dropWhile isLower) } ''Torrent)
243 243
244makeLensesFor 244makeLensesFor
245 [ ("tAnnounce" , "announce" ) 245 [ ("tAnnounce" , "announce" )