summaryrefslogtreecommitdiff
path: root/bench/Main.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-05-25 21:41:15 +0400
committerSam T <pxqr.sta@gmail.com>2013-05-25 21:41:15 +0400
commit5e92eec501e0a1ca6d09a01e078cf54ff3277273 (patch)
tree09879470eb7a5cd73c80bd2c84e589bd7e58b052 /bench/Main.hs
parent12769d2f1cfc29e08c4e451d3b65db81cfeb9cac (diff)
~ Use PortNumber instead of Word16 in Port message.
Diffstat (limited to 'bench/Main.hs')
-rw-r--r--bench/Main.hs5
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
7import Data.ByteString (ByteString) 7import Data.ByteString (ByteString)
8import qualified Data.ByteString as B 8import qualified Data.ByteString as B
9import Data.Serialize 9import Data.Serialize
10import Network
11
10import Network.BitTorrent as BT 12import Network.BitTorrent as BT
11import Data.Bitfield as BT 13import Data.Bitfield as BT
12 14
13 15
16instance NFData PortNumber where
17 rnf = rnf . (fromIntegral :: PortNumber -> Int)
18
14instance NFData BlockIx where 19instance 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