diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-05-25 21:41:15 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-05-25 21:41:15 +0400 |
commit | 5e92eec501e0a1ca6d09a01e078cf54ff3277273 (patch) | |
tree | 09879470eb7a5cd73c80bd2c84e589bd7e58b052 /bench/Main.hs | |
parent | 12769d2f1cfc29e08c4e451d3b65db81cfeb9cac (diff) |
~ Use PortNumber instead of Word16 in Port message.
Diffstat (limited to 'bench/Main.hs')
-rw-r--r-- | bench/Main.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bench/Main.hs b/bench/Main.hs index 269e60f5..6e8a0ce3 100644 --- a/bench/Main.hs +++ b/bench/Main.hs | |||
@@ -7,10 +7,15 @@ import Criterion.Main | |||
7 | import Data.ByteString (ByteString) | 7 | import Data.ByteString (ByteString) |
8 | import qualified Data.ByteString as B | 8 | import qualified Data.ByteString as B |
9 | import Data.Serialize | 9 | import Data.Serialize |
10 | import Network | ||
11 | |||
10 | import Network.BitTorrent as BT | 12 | import Network.BitTorrent as BT |
11 | import Data.Bitfield as BT | 13 | import Data.Bitfield as BT |
12 | 14 | ||
13 | 15 | ||
16 | instance NFData PortNumber where | ||
17 | rnf = rnf . (fromIntegral :: PortNumber -> Int) | ||
18 | |||
14 | instance NFData BlockIx where | 19 | instance NFData BlockIx where |
15 | rnf (BlockIx a b c) = a `deepseq` b `deepseq` rnf c | 20 | rnf (BlockIx a b c) = a `deepseq` b `deepseq` rnf c |
16 | 21 | ||