summaryrefslogtreecommitdiff
path: root/src/Data/Torrent/Piece.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-12-01 12:32:49 -0800
committerSam Truzjan <pxqr.sta@gmail.com>2013-12-01 12:32:49 -0800
commitf4fcc6c1970ec8d63e185e49dff65a6bd77011ad (patch)
tree5472de9cdb8afd6b15752f796ece829bf9e0316a /src/Data/Torrent/Piece.hs
parent2749007675a6ff28979fa793b48ffe910635c708 (diff)
parent5dc7a19e42da1ee1cc3570ca74a55c32d7d243e0 (diff)
Merge pull request #2 from DanielG/master
Fix building with aeson >= 0.6.2.0
Diffstat (limited to 'src/Data/Torrent/Piece.hs')
-rw-r--r--src/Data/Torrent/Piece.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/Torrent/Piece.hs b/src/Data/Torrent/Piece.hs
index 7eb4e3d5..f7c6257b 100644
--- a/src/Data/Torrent/Piece.hs
+++ b/src/Data/Torrent/Piece.hs
@@ -117,7 +117,7 @@ data Piece a = Piece
117 , pieceData :: !a 117 , pieceData :: !a
118 } deriving (Show, Read, Eq, Typeable) 118 } deriving (Show, Read, Eq, Typeable)
119 119
120$(deriveJSON (L.map toLower . L.dropWhile isLower) ''Piece) 120$(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''Piece)
121 121
122instance NFData (Piece a) 122instance NFData (Piece a)
123 123
@@ -160,7 +160,7 @@ data PieceInfo = PieceInfo
160 -- ^ Concatenation of all 20-byte SHA1 hash values. 160 -- ^ Concatenation of all 20-byte SHA1 hash values.
161 } deriving (Show, Read, Eq, Typeable) 161 } deriving (Show, Read, Eq, Typeable)
162 162
163$(deriveJSON (L.map toLower . L.dropWhile isLower) ''PieceInfo) 163$(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''PieceInfo)
164 164
165-- | Number of bytes in each piece. 165-- | Number of bytes in each piece.
166makeLensesFor [("piPieceLength", "pieceLength")] ''PieceInfo 166makeLensesFor [("piPieceLength", "pieceLength")] ''PieceInfo