diff options
author | joe <joe@jerkface.net> | 2013-07-12 15:40:05 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2013-07-12 15:40:05 -0400 |
commit | 77f1978d8f73d4b5292c90283ec22ddffab7b077 (patch) | |
tree | 17977bdd205f226d8a6609c051ad85607fcdcc36 /Presence | |
parent | 1e922a7f1b366a28487db05da28d3adece35822a (diff) |
Removed redundant imports
Diffstat (limited to 'Presence')
-rw-r--r-- | Presence/ServerC.hs | 4 | ||||
-rw-r--r-- | Presence/XMPP.hs | 21 | ||||
-rw-r--r-- | Presence/XMPPTypes.hs | 13 | ||||
-rw-r--r-- | Presence/main.hs | 2 |
4 files changed, 14 insertions, 26 deletions
diff --git a/Presence/ServerC.hs b/Presence/ServerC.hs index 22104a31..02c6446e 100644 --- a/Presence/ServerC.hs +++ b/Presence/ServerC.hs | |||
@@ -18,8 +18,7 @@ import Data.ByteString.Char8 | |||
18 | ( hGetNonBlocking | 18 | ( hGetNonBlocking |
19 | ) | 19 | ) |
20 | import qualified Data.ByteString.Char8 as S | 20 | import qualified Data.ByteString.Char8 as S |
21 | ( hPutStr | 21 | ( hPutStrLn |
22 | , hPutStrLn | ||
23 | ) | 22 | ) |
24 | import System.IO | 23 | import System.IO |
25 | ( IOMode(..) | 24 | ( IOMode(..) |
@@ -38,7 +37,6 @@ import Data.HList.TypeCastGeneric1() | |||
38 | import System.IO.Error | 37 | import System.IO.Error |
39 | 38 | ||
40 | import Data.Conduit | 39 | import Data.Conduit |
41 | import Control.Monad.Trans.Class (lift) | ||
42 | import Control.Monad.IO.Class (MonadIO (liftIO)) | 40 | import Control.Monad.IO.Class (MonadIO (liftIO)) |
43 | import qualified Data.ByteString as S (ByteString) | 41 | import qualified Data.ByteString as S (ByteString) |
44 | import System.IO (Handle) | 42 | import System.IO (Handle) |
diff --git a/Presence/XMPP.hs b/Presence/XMPP.hs index 37a3c5f8..e51607b2 100644 --- a/Presence/XMPP.hs +++ b/Presence/XMPP.hs | |||
@@ -32,11 +32,7 @@ import Network.Socket | |||
32 | , SocketType(..) | 32 | , SocketType(..) |
33 | ) | 33 | ) |
34 | import Network.BSD | 34 | import Network.BSD |
35 | ( PortNumber | 35 | ( getProtocolNumber |
36 | , getHostName | ||
37 | , hostName | ||
38 | , hostAliases | ||
39 | , getProtocolNumber | ||
40 | ) | 36 | ) |
41 | import System.IO | 37 | import System.IO |
42 | ( BufferMode(..) | 38 | ( BufferMode(..) |
@@ -48,16 +44,14 @@ import Data.Conduit | |||
48 | import qualified Data.Conduit.List as CL | 44 | import qualified Data.Conduit.List as CL |
49 | import qualified Data.Conduit.Binary as CB | 45 | import qualified Data.Conduit.Binary as CB |
50 | import Data.ByteString (ByteString) | 46 | import Data.ByteString (ByteString) |
51 | import qualified Data.ByteString.Char8 as S (pack,putStr,putStrLn,append) | 47 | import qualified Data.ByteString.Char8 as S (putStrLn,append) |
52 | import qualified Data.ByteString.Lazy.Char8 as L | 48 | import qualified Data.ByteString.Lazy.Char8 as L |
53 | ( putStrLn | 49 | ( putStrLn |
54 | , fromChunks | 50 | , fromChunks |
55 | , unlines | ||
56 | , hPutStrLn | ||
57 | ) | 51 | ) |
58 | import Control.Concurrent (forkIO,killThread) | 52 | import Control.Concurrent (forkIO) |
59 | import Control.Concurrent.Async | 53 | import Control.Concurrent.Async |
60 | import Control.Exception | 54 | import Control.Exception as E |
61 | ( handle | 55 | ( handle |
62 | -- , SomeException(..) | 56 | -- , SomeException(..) |
63 | , finally | 57 | , finally |
@@ -67,16 +61,13 @@ import System.IO.Error (isDoesNotExistError) | |||
67 | import Control.Monad.IO.Class | 61 | import Control.Monad.IO.Class |
68 | import Control.Monad.Trans.Class | 62 | import Control.Monad.Trans.Class |
69 | import Control.Monad.Trans.Maybe | 63 | import Control.Monad.Trans.Maybe |
70 | import Todo | ||
71 | import Control.Monad as Monad | ||
72 | import Text.XML.Stream.Parse (parseBytes,content) | 64 | import Text.XML.Stream.Parse (parseBytes,content) |
73 | import Text.XML.Stream.Render | 65 | import Text.XML.Stream.Render |
74 | import Data.XML.Types as XML | 66 | import Data.XML.Types as XML |
75 | import qualified Data.Text as S (takeWhile) | 67 | import qualified Data.Text as S (takeWhile) |
76 | import Data.Text.Encoding as S (decodeUtf8,encodeUtf8) | 68 | import Data.Text.Encoding as S (decodeUtf8,encodeUtf8) |
77 | import Data.Text.Lazy.Encoding as L (decodeUtf8,encodeUtf8) | 69 | import Data.Text.Lazy.Encoding as L (decodeUtf8) |
78 | import Data.Text.Lazy (toStrict) | 70 | import Data.Text.Lazy (toStrict) |
79 | import Data.Monoid | ||
80 | import qualified Data.Sequence as Seq | 71 | import qualified Data.Sequence as Seq |
81 | import Data.Foldable (toList) | 72 | import Data.Foldable (toList) |
82 | #ifdef RENDERFLUSH | 73 | #ifdef RENDERFLUSH |
@@ -1083,7 +1074,7 @@ toPeer sock cache chan fail = do | |||
1083 | let -- log = liftIO . L.putStrLn . ("(>P) " <++>) | 1074 | let -- log = liftIO . L.putStrLn . ("(>P) " <++>) |
1084 | send xs = yield xs >> prettyPrint ">P: " xs -- >> return (3::Int) | 1075 | send xs = yield xs >> prettyPrint ">P: " xs -- >> return (3::Int) |
1085 | checkConnection cmd = do | 1076 | checkConnection cmd = do |
1086 | liftIO $ catch (getPeerName sock >> return ()) | 1077 | liftIO $ catchIO (getPeerName sock >> return ()) |
1087 | (\_ -> fail . Just $ cmd) | 1078 | (\_ -> fail . Just $ cmd) |
1088 | sendOrFail getXML cmd = do | 1079 | sendOrFail getXML cmd = do |
1089 | checkConnection cmd | 1080 | checkConnection cmd |
diff --git a/Presence/XMPPTypes.hs b/Presence/XMPPTypes.hs index 4507f5bf..4802002c 100644 --- a/Presence/XMPPTypes.hs +++ b/Presence/XMPPTypes.hs | |||
@@ -3,9 +3,7 @@ | |||
3 | module XMPPTypes where | 3 | module XMPPTypes where |
4 | 4 | ||
5 | import Network.Socket | 5 | import Network.Socket |
6 | ( Socket | 6 | ( Family(..) |
7 | , Family(..) | ||
8 | , SockAddr(..) | ||
9 | , getAddrInfo | 7 | , getAddrInfo |
10 | , addrCanonName | 8 | , addrCanonName |
11 | , addrAddress | 9 | , addrAddress |
@@ -18,9 +16,11 @@ import Network.BSD | |||
18 | , hostName | 16 | , hostName |
19 | , hostAliases | 17 | , hostAliases |
20 | ) | 18 | ) |
21 | import System.IO (Handle) | ||
22 | import Control.Concurrent.STM (TChan) | 19 | import Control.Concurrent.STM (TChan) |
23 | import qualified Data.ByteString.Char8 as S (ByteString,pack,putStr,putStrLn,append) | 20 | import qualified Data.ByteString.Char8 as S |
21 | ( ByteString | ||
22 | , pack | ||
23 | ) | ||
24 | import Data.ByteString.Lazy.Char8 as L | 24 | import Data.ByteString.Lazy.Char8 as L |
25 | ( ByteString | 25 | ( ByteString |
26 | , unpack | 26 | , unpack |
@@ -37,8 +37,7 @@ import Control.DeepSeq | |||
37 | import ByteStringOperators | 37 | import ByteStringOperators |
38 | import SocketLike | 38 | import SocketLike |
39 | import GetHostByAddr | 39 | import GetHostByAddr |
40 | import Data.Maybe (listToMaybe,catMaybes) | 40 | import Data.Maybe (listToMaybe) |
41 | import Control.Monad.STM | ||
42 | 41 | ||
43 | class JabberClientSession session where | 42 | class JabberClientSession session where |
44 | data XMPPClass session | 43 | data XMPPClass session |
diff --git a/Presence/main.hs b/Presence/main.hs index 781b87fa..deab92ac 100644 --- a/Presence/main.hs +++ b/Presence/main.hs | |||
@@ -56,7 +56,7 @@ import Data.ByteString.Lazy.Char8 as L (ByteString,putStrLn) | |||
56 | import qualified Prelude | 56 | import qualified Prelude |
57 | import Prelude hiding (putStrLn) | 57 | import Prelude hiding (putStrLn) |
58 | import System.Environment | 58 | import System.Environment |
59 | import qualified Text.Show.ByteString as L | 59 | -- import qualified Text.Show.ByteString as L |
60 | import Network.Socket (Family(AF_INET,AF_INET6)) | 60 | import Network.Socket (Family(AF_INET,AF_INET6)) |
61 | import Holumbus.Data.MultiMap as MM (MultiMap) | 61 | import Holumbus.Data.MultiMap as MM (MultiMap) |
62 | import qualified Holumbus.Data.MultiMap as MM | 62 | import qualified Holumbus.Data.MultiMap as MM |