From ae555a1e49b7cbe606aac4f24a37200fd78ce90e Mon Sep 17 00:00:00 2001 From: Sam T Date: Sun, 12 May 2013 05:08:29 +0400 Subject: ~ Fix wall suggestions. --- src/Remote/KRPC.hs | 6 ++---- src/Remote/KRPC/Method.hs | 6 +----- src/Remote/KRPC/Protocol.hs | 6 +++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/Remote/KRPC.hs b/src/Remote/KRPC.hs index fcfdf6bf..a542f0b4 100644 --- a/src/Remote/KRPC.hs +++ b/src/Remote/KRPC.hs @@ -22,14 +22,12 @@ module Remote.KRPC ) where import Control.Exception -import Control.Monad import Control.Monad.Trans.Control import Control.Monad.IO.Class import Data.BEncode import Data.ByteString.Char8 as BC import Data.List as L import Data.Map as M -import Data.Set as S import Data.Typeable import Network @@ -121,8 +119,8 @@ type MethodHandler remote = (MethodName, HandlerBody remote) -- we can safely erase types in (==>) (==>) :: forall (remote :: * -> *) (param :: *) (result :: *). - (BEncodable param, BEncodable result) - => (Extractable param, Extractable result) +-- (BEncodable param, BEncodable result) + (Extractable param, Extractable result) => Monad remote => Method param result -> (param -> remote result) diff --git a/src/Remote/KRPC/Method.hs b/src/Remote/KRPC/Method.hs index 8aa6ddc9..d0c8e89a 100644 --- a/src/Remote/KRPC/Method.hs +++ b/src/Remote/KRPC/Method.hs @@ -21,13 +21,8 @@ module Remote.KRPC.Method , Extractable(..) ) where -import Prelude hiding ((.), id) import Control.Applicative -import Control.Category -import Control.Monad import Data.BEncode -import Data.ByteString as B -import Data.List as L import Data.Set as S import Remote.KRPC.Protocol @@ -89,6 +84,7 @@ instance (BEncodable a, BEncodable b) => Extractable (a, b) where extractor [a, b] = (,) <$> fromBEncode a <*> fromBEncode b extractor _ = decodingError "unable to match pair" {-# INLINE extractor #-} + {- instance BEncodable a => Extractable a where {-# SPECIALIZE instance BEncodable a => Extractable a #-} diff --git a/src/Remote/KRPC/Protocol.hs b/src/Remote/KRPC/Protocol.hs index 918bc735..c922c1d6 100644 --- a/src/Remote/KRPC/Protocol.hs +++ b/src/Remote/KRPC/Protocol.hs @@ -97,8 +97,8 @@ instance BEncodable KError where ] fromBEncode (BDict d) - | M.lookup "y" d == Just (BString "e") = - uncurry mkKError <$> d >-- "e" + | M.lookup "y" d == Just (BString "e") + = uncurry mkKError <$> d >-- "e" fromBEncode _ = decodingError "KError" @@ -278,4 +278,4 @@ instance (BEncodable a, BEncodable b) => BEncodable (a, b) where Right [a, b] -> (,) <$> fromBEncode a <*> fromBEncode b Right _ -> decodingError "Unable to decode a pair." Left e -> Left e - {-# INLINE fromBEncode #-} \ No newline at end of file + {-# INLINE fromBEncode #-} -- cgit v1.2.3