diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-25 07:37:35 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-25 07:37:35 +0400 |
commit | 23eb8500987043a79715e01f07e2febab6adaabc (patch) | |
tree | 7ee72f1769652b63b08ec2449273130d5694685c /src/Network/BitTorrent/Exchange/Message.hs | |
parent | f3bf620062d114de747e55a85137e1a8c08e78fe (diff) |
Fix name shadowing warning in Monoid instance
Diffstat (limited to 'src/Network/BitTorrent/Exchange/Message.hs')
-rw-r--r-- | src/Network/BitTorrent/Exchange/Message.hs | 7 |
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 | ||
680 | instance Monoid ExtendedHandshake where | 680 | instance 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 | ||
698 | instance BEncode ExtendedHandshake where | 697 | instance BEncode ExtendedHandshake where |