diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-02 00:55:06 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-02 00:55:06 +0400 |
commit | cc1f6959280431a3554e0c0f01960b7b67826c65 (patch) | |
tree | 62d60709efc26889dfb3f4588ef546ece63c06d4 /src/Data/Torrent/Piece.hs | |
parent | 9a73e365f4c29080ab6ce04290b36e3189171289 (diff) | |
parent | af9573a7519e76c10a0cca168355ca866d22c429 (diff) |
Merge branch 'master' of https://github.com/cobit/bittorrent
Diffstat (limited to 'src/Data/Torrent/Piece.hs')
-rw-r--r-- | src/Data/Torrent/Piece.hs | 4 |
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 | ||
123 | instance NFData (Piece a) | 123 | instance 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. |
167 | makeLensesFor [("piPieceLength", "pieceLength")] ''PieceInfo | 167 | makeLensesFor [("piPieceLength", "pieceLength")] ''PieceInfo |