From b83c5d53be21c03004ebb65d1dc9fe1f841a2a3c Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sun, 1 Dec 2013 21:12:40 +0100 Subject: 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. --- src/Network/BitTorrent/Exchange/Status.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Network/BitTorrent/Exchange') diff --git a/src/Network/BitTorrent/Exchange/Status.hs b/src/Network/BitTorrent/Exchange/Status.hs index 7920f2a1..03a71bbe 100644 --- a/src/Network/BitTorrent/Exchange/Status.hs +++ b/src/Network/BitTorrent/Exchange/Status.hs @@ -35,7 +35,7 @@ data PeerStatus = PeerStatus { } deriving (Show, Eq) $(makeLenses ''PeerStatus) -$(deriveJSON L.tail ''PeerStatus) +$(deriveJSON defaultOptions { fieldLabelModifier = L.tail } ''PeerStatus) instance Default PeerStatus where def = PeerStatus True False -- cgit v1.2.3 From 815e9f64af96e2b917be77dc31b903fcbac292b4 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sun, 1 Dec 2013 21:37:19 +0100 Subject: Fix building with aeson >= 0.6.2.0 ..again ..overlooked this one, no idea why that built before --- src/Network/BitTorrent/Exchange/Status.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Network/BitTorrent/Exchange') diff --git a/src/Network/BitTorrent/Exchange/Status.hs b/src/Network/BitTorrent/Exchange/Status.hs index 03a71bbe..ae323e09 100644 --- a/src/Network/BitTorrent/Exchange/Status.hs +++ b/src/Network/BitTorrent/Exchange/Status.hs @@ -56,7 +56,7 @@ data SessionStatus = SessionStatus { } deriving (Show, Eq) $(makeLenses ''SessionStatus) -$(deriveJSON L.tail ''SessionStatus) +$(deriveJSON defaultOptions { fieldLabelModifier = L.tail } ''SessionStatus) instance Default SessionStatus where def = SessionStatus def def -- cgit v1.2.3