summaryrefslogtreecommitdiff
path: root/src/Data/Torrent.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Torrent.hs')
-rw-r--r--src/Data/Torrent.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs
index ce919907..a511d6c1 100644
--- a/src/Data/Torrent.hs
+++ b/src/Data/Torrent.hs
@@ -92,6 +92,7 @@ import Text.PrettyPrint.Class
92import System.FilePath 92import System.FilePath
93 93
94import Data.Torrent.InfoHash as IH 94import Data.Torrent.InfoHash as IH
95import Data.Torrent.JSON
95import Data.Torrent.Layout 96import Data.Torrent.Layout
96import Data.Torrent.Piece 97import Data.Torrent.Piece
97 98
@@ -123,7 +124,7 @@ data InfoDict = InfoDict
123 -- BEP 27: <http://www.bittorrent.org/beps/bep_0027.html> 124 -- BEP 27: <http://www.bittorrent.org/beps/bep_0027.html>
124 } deriving (Show, Read, Eq, Typeable) 125 } deriving (Show, Read, Eq, Typeable)
125 126
126$(deriveJSON defaultOptions { fieldLabelModifier = (L.map Char.toLower . L.dropWhile isLower) } ''InfoDict) 127$(deriveJSON omitRecordPrefix ''InfoDict)
127 128
128makeLensesFor 129makeLensesFor
129 [ ("idInfoHash" , "infohash" ) 130 [ ("idInfoHash" , "infohash" )
@@ -239,7 +240,7 @@ instance ToJSON NominalDiffTime where
239instance FromJSON NominalDiffTime where 240instance FromJSON NominalDiffTime where
240 parseJSON v = utcTimeToPOSIXSeconds <$> parseJSON v 241 parseJSON v = utcTimeToPOSIXSeconds <$> parseJSON v
241 242
242$(deriveJSON defaultOptions { fieldLabelModifier = (L.map Char.toLower . L.dropWhile isLower) } ''Torrent) 243$(deriveJSON omitRecordPrefix ''Torrent)
243 244
244makeLensesFor 245makeLensesFor
245 [ ("tAnnounce" , "announce" ) 246 [ ("tAnnounce" , "announce" )