summaryrefslogtreecommitdiff
path: root/src/Data/Torrent/Block.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/Block.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/Block.hs')
-rw-r--r--src/Data/Torrent/Block.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Data/Torrent/Block.hs b/src/Data/Torrent/Block.hs
index 37889a7a..fd12b7a0 100644
--- a/src/Data/Torrent/Block.hs
+++ b/src/Data/Torrent/Block.hs
@@ -97,7 +97,7 @@ data BlockIx = BlockIx {
97 , ixLength :: {-# UNPACK #-} !BlockSize 97 , ixLength :: {-# UNPACK #-} !BlockSize
98 } deriving (Show, Eq) 98 } deriving (Show, Eq)
99 99
100$(deriveJSON (L.map toLower . L.dropWhile isLower) ''BlockIx) 100$(deriveJSON defaultOptions { fieldLabelModifier = (L.map toLower . L.dropWhile isLower) } ''BlockIx)
101 101
102getInt :: S.Get Int 102getInt :: S.Get Int
103getInt = fromIntegral <$> S.getWord32be 103getInt = fromIntegral <$> S.getWord32be