summaryrefslogtreecommitdiff
path: root/src/Data/Torrent/Piece.hs
diff options
context:
space:
mode:
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 c6223348..31680ce8 100644
--- a/src/Data/Torrent/Piece.hs
+++ b/src/Data/Torrent/Piece.hs
@@ -118,7 +118,7 @@ data Piece a = Piece
118 , pieceData :: !a 118 , pieceData :: !a
119 } deriving (Show, Read, Eq, Functor, Typeable) 119 } deriving (Show, Read, Eq, Functor, Typeable)
120 120
121$(deriveJSON (L.map toLower . L.dropWhile isLower) ''Piece) 121$(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''Piece)
122 122
123instance NFData (Piece a) 123instance NFData (Piece a)
124 124
@@ -161,7 +161,7 @@ data PieceInfo = PieceInfo
161 -- ^ Concatenation of all 20-byte SHA1 hash values. 161 -- ^ Concatenation of all 20-byte SHA1 hash values.
162 } deriving (Show, Read, Eq, Typeable) 162 } deriving (Show, Read, Eq, Typeable)
163 163
164$(deriveJSON (L.map toLower . L.dropWhile isLower) ''PieceInfo) 164$(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''PieceInfo)
165 165
166-- | Number of bytes in each piece. 166-- | Number of bytes in each piece.
167makeLensesFor [("piPieceLength", "pieceLength")] ''PieceInfo 167makeLensesFor [("piPieceLength", "pieceLength")] ''PieceInfo