diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-16 02:50:51 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-02-16 02:50:51 +0400 |
commit | 30ed5ec2dd5a60bf64da055c25c8ad86915bb14a (patch) | |
tree | 012b614289b48af29dd39f64d4131b24dadd1728 /src | |
parent | 48cbf1244b762d3a52e15d16ba0c3391f095501c (diff) |
Add Show and Eq instances for routing table
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/BitTorrent/DHT/Routing.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/DHT/Routing.hs b/src/Network/BitTorrent/DHT/Routing.hs index 8e09d95e..106aec31 100644 --- a/src/Network/BitTorrent/DHT/Routing.hs +++ b/src/Network/BitTorrent/DHT/Routing.hs | |||
@@ -309,7 +309,10 @@ data Table ip | |||
309 | 309 | ||
310 | -- right biased tree branch | 310 | -- right biased tree branch |
311 | | One (Bucket ip) (Table ip) | 311 | | One (Bucket ip) (Table ip) |
312 | deriving Generic | 312 | deriving (Show, Generic) |
313 | |||
314 | instance Eq ip => Eq (Table ip) where | ||
315 | (==) = (==) `on` Network.BitTorrent.DHT.Routing.toList | ||
313 | 316 | ||
314 | instance Serialize NominalDiffTime where | 317 | instance Serialize NominalDiffTime where |
315 | put = putWord32be . fromIntegral . fromEnum | 318 | put = putWord32be . fromIntegral . fromEnum |