From 1c7601a6cca488202abb24578ac9163029f381ab Mon Sep 17 00:00:00 2001 From: Sam T Date: Mon, 26 Aug 2013 21:06:33 +0400 Subject: ~ Move instance for NFData to library. --- bench/Main.hs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'bench') 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 import Data.AttoBencode.Parser as B import "bencoding" Data.BEncode as C - instance NFData A.BEncode where rnf (A.BInt i) = rnf i rnf (A.BString s) = rnf s @@ -28,15 +27,8 @@ instance NFData B.BValue where rnf (B.BList l) = rnf l rnf (B.BDict d) = rnf d -instance NFData C.BEncode where - rnf (C.BInteger i) = rnf i - rnf (C.BString s) = rnf s - rnf (C.BList l) = rnf l - rnf (C.BDict d) = rnf d - getRight :: Either String a -> a -getRight (Left e) = error e -getRight (Right x) = x +getRight = either error id main :: IO () main = do -- cgit v1.2.3