summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
Diffstat (limited to 'bench')
-rw-r--r--bench/Main.hs10
1 files changed, 1 insertions, 9 deletions
diff --git a/bench/Main.hs b/bench/Main.hs
index 2edf43a..20de179 100644
--- a/bench/Main.hs
+++ b/bench/Main.hs
@@ -15,7 +15,6 @@ import Data.AttoBencode as B
15import Data.AttoBencode.Parser as B 15import Data.AttoBencode.Parser as B
16import "bencoding" Data.BEncode as C 16import "bencoding" Data.BEncode as C
17 17
18
19instance NFData A.BEncode where 18instance NFData A.BEncode where
20 rnf (A.BInt i) = rnf i 19 rnf (A.BInt i) = rnf i
21 rnf (A.BString s) = rnf s 20 rnf (A.BString s) = rnf s
@@ -28,15 +27,8 @@ instance NFData B.BValue where
28 rnf (B.BList l) = rnf l 27 rnf (B.BList l) = rnf l
29 rnf (B.BDict d) = rnf d 28 rnf (B.BDict d) = rnf d
30 29
31instance NFData C.BEncode where
32 rnf (C.BInteger i) = rnf i
33 rnf (C.BString s) = rnf s
34 rnf (C.BList l) = rnf l
35 rnf (C.BDict d) = rnf d
36
37getRight :: Either String a -> a 30getRight :: Either String a -> a
38getRight (Left e) = error e 31getRight = either error id
39getRight (Right x) = x
40 32
41main :: IO () 33main :: IO ()
42main = do 34main = do