diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-05-12 05:08:29 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-05-12 05:08:29 +0400 |
commit | ae555a1e49b7cbe606aac4f24a37200fd78ce90e (patch) | |
tree | 1dc0e9bd9042670a4a4dc77b08583770bd572896 | |
parent | 250db0db86afe9462de1624a11e6b124c191d467 (diff) |
~ Fix wall suggestions.
-rw-r--r-- | src/Remote/KRPC.hs | 6 | ||||
-rw-r--r-- | src/Remote/KRPC/Method.hs | 6 | ||||
-rw-r--r-- | 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 | |||
22 | ) where | 22 | ) where |
23 | 23 | ||
24 | import Control.Exception | 24 | import Control.Exception |
25 | import Control.Monad | ||
26 | import Control.Monad.Trans.Control | 25 | import Control.Monad.Trans.Control |
27 | import Control.Monad.IO.Class | 26 | import Control.Monad.IO.Class |
28 | import Data.BEncode | 27 | import Data.BEncode |
29 | import Data.ByteString.Char8 as BC | 28 | import Data.ByteString.Char8 as BC |
30 | import Data.List as L | 29 | import Data.List as L |
31 | import Data.Map as M | 30 | import Data.Map as M |
32 | import Data.Set as S | ||
33 | import Data.Typeable | 31 | import Data.Typeable |
34 | import Network | 32 | import 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 | ||
24 | import Prelude hiding ((.), id) | ||
25 | import Control.Applicative | 24 | import Control.Applicative |
26 | import Control.Category | ||
27 | import Control.Monad | ||
28 | import Data.BEncode | 25 | import Data.BEncode |
29 | import Data.ByteString as B | ||
30 | import Data.List as L | ||
31 | import Data.Set as S | 26 | import Data.Set as S |
32 | 27 | ||
33 | import Remote.KRPC.Protocol | 28 | import 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 | {- |
93 | instance BEncodable a => Extractable a where | 89 | instance 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 #-} |