summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-12-25 07:37:35 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-12-25 07:37:35 +0400
commit23eb8500987043a79715e01f07e2febab6adaabc (patch)
tree7ee72f1769652b63b08ec2449273130d5694685c
parentf3bf620062d114de747e55a85137e1a8c08e78fe (diff)
Fix name shadowing warning in Monoid instance
-rw-r--r--src/Network/BitTorrent/Exchange/Message.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Network/BitTorrent/Exchange/Message.hs b/src/Network/BitTorrent/Exchange/Message.hs
index 8d0c62f4..e93f8bbe 100644
--- a/src/Network/BitTorrent/Exchange/Message.hs
+++ b/src/Network/BitTorrent/Exchange/Message.hs
@@ -679,8 +679,7 @@ instance Default ExtendedHandshake where
679 679
680instance Monoid ExtendedHandshake where 680instance Monoid ExtendedHandshake where
681 mempty = def { ehsCaps = mempty } 681 mempty = def { ehsCaps = mempty }
682 mappend old new = 682 mappend old new = ExtendedHandshake {
683 ExtendedHandshake {
684 ehsCaps = ehsCaps old <> ehsCaps new, 683 ehsCaps = ehsCaps old <> ehsCaps new,
685 ehsIPv4 = ehsIPv4 old `mergeOld` ehsIPv4 new, 684 ehsIPv4 = ehsIPv4 old `mergeOld` ehsIPv4 new,
686 ehsIPv6 = ehsIPv6 old `mergeOld` ehsIPv6 new, 685 ehsIPv6 = ehsIPv6 old `mergeOld` ehsIPv6 new,
@@ -691,8 +690,8 @@ instance Monoid ExtendedHandshake where
691 ehsYourIp = ehsYourIp old `mergeOld` ehsYourIp new 690 ehsYourIp = ehsYourIp old `mergeOld` ehsYourIp new
692 } 691 }
693 where 692 where
694 mergeOld old new = old <|> new 693 mergeOld mold mnew = mold <|> mnew
695 mergeNew old new = new <|> old 694 mergeNew mold mnew = mnew <|> mold
696 695
697 696
698instance BEncode ExtendedHandshake where 697instance BEncode ExtendedHandshake where