summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-05-12 05:08:29 +0400
committerSam T <pxqr.sta@gmail.com>2013-05-12 05:08:29 +0400
commitae555a1e49b7cbe606aac4f24a37200fd78ce90e (patch)
tree1dc0e9bd9042670a4a4dc77b08583770bd572896
parent250db0db86afe9462de1624a11e6b124c191d467 (diff)
~ Fix wall suggestions.
-rw-r--r--src/Remote/KRPC.hs6
-rw-r--r--src/Remote/KRPC/Method.hs6
-rw-r--r--src/Remote/KRPC/Protocol.hs6
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
22 ) where 22 ) where
23 23
24import Control.Exception 24import Control.Exception
25import Control.Monad
26import Control.Monad.Trans.Control 25import Control.Monad.Trans.Control
27import Control.Monad.IO.Class 26import Control.Monad.IO.Class
28import Data.BEncode 27import Data.BEncode
29import Data.ByteString.Char8 as BC 28import Data.ByteString.Char8 as BC
30import Data.List as L 29import Data.List as L
31import Data.Map as M 30import Data.Map as M
32import Data.Set as S
33import Data.Typeable 31import Data.Typeable
34import Network 32import Network
35 33
@@ -121,8 +119,8 @@ type MethodHandler remote = (MethodName, HandlerBody remote)
121 119
122-- we can safely erase types in (==>) 120-- we can safely erase types in (==>)
123(==>) :: forall (remote :: * -> *) (param :: *) (result :: *). 121(==>) :: forall (remote :: * -> *) (param :: *) (result :: *).
124 (BEncodable param, BEncodable result) 122-- (BEncodable param, BEncodable result)
125 => (Extractable param, Extractable result) 123 (Extractable param, Extractable result)
126 => Monad remote 124 => Monad remote
127 => Method param result 125 => Method param result
128 -> (param -> remote result) 126 -> (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
21 , Extractable(..) 21 , Extractable(..)
22 ) where 22 ) where
23 23
24import Prelude hiding ((.), id)
25import Control.Applicative 24import Control.Applicative
26import Control.Category
27import Control.Monad
28import Data.BEncode 25import Data.BEncode
29import Data.ByteString as B
30import Data.List as L
31import Data.Set as S 26import Data.Set as S
32 27
33import Remote.KRPC.Protocol 28import Remote.KRPC.Protocol
@@ -89,6 +84,7 @@ instance (BEncodable a, BEncodable b) => Extractable (a, b) where
89 extractor [a, b] = (,) <$> fromBEncode a <*> fromBEncode b 84 extractor [a, b] = (,) <$> fromBEncode a <*> fromBEncode b
90 extractor _ = decodingError "unable to match pair" 85 extractor _ = decodingError "unable to match pair"
91 {-# INLINE extractor #-} 86 {-# INLINE extractor #-}
87
92{- 88{-
93instance BEncodable a => Extractable a where 89instance BEncodable a => Extractable a where
94 {-# SPECIALIZE instance BEncodable a => Extractable a #-} 90 {-# 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
97 ] 97 ]
98 98
99 fromBEncode (BDict d) 99 fromBEncode (BDict d)
100 | M.lookup "y" d == Just (BString "e") = 100 | M.lookup "y" d == Just (BString "e")
101 uncurry mkKError <$> d >-- "e" 101 = uncurry mkKError <$> d >-- "e"
102 102
103 fromBEncode _ = decodingError "KError" 103 fromBEncode _ = decodingError "KError"
104 104
@@ -278,4 +278,4 @@ instance (BEncodable a, BEncodable b) => BEncodable (a, b) where
278 Right [a, b] -> (,) <$> fromBEncode a <*> fromBEncode b 278 Right [a, b] -> (,) <$> fromBEncode a <*> fromBEncode b
279 Right _ -> decodingError "Unable to decode a pair." 279 Right _ -> decodingError "Unable to decode a pair."
280 Left e -> Left e 280 Left e -> Left e
281 {-# INLINE fromBEncode #-} \ No newline at end of file 281 {-# INLINE fromBEncode #-}