summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2013-07-12 15:40:05 -0400
committerjoe <joe@jerkface.net>2013-07-12 15:40:05 -0400
commit77f1978d8f73d4b5292c90283ec22ddffab7b077 (patch)
tree17977bdd205f226d8a6609c051ad85607fcdcc36
parent1e922a7f1b366a28487db05da28d3adece35822a (diff)
Removed redundant imports
-rw-r--r--Presence/ServerC.hs4
-rw-r--r--Presence/XMPP.hs21
-rw-r--r--Presence/XMPPTypes.hs13
-rw-r--r--Presence/main.hs2
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 )
20import qualified Data.ByteString.Char8 as S 20import qualified Data.ByteString.Char8 as S
21 ( hPutStr 21 ( hPutStrLn
22 , hPutStrLn
23 ) 22 )
24import System.IO 23import System.IO
25 ( IOMode(..) 24 ( IOMode(..)
@@ -38,7 +37,6 @@ import Data.HList.TypeCastGeneric1()
38import System.IO.Error 37import System.IO.Error
39 38
40import Data.Conduit 39import Data.Conduit
41import Control.Monad.Trans.Class (lift)
42import Control.Monad.IO.Class (MonadIO (liftIO)) 40import Control.Monad.IO.Class (MonadIO (liftIO))
43import qualified Data.ByteString as S (ByteString) 41import qualified Data.ByteString as S (ByteString)
44import System.IO (Handle) 42import 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 )
34import Network.BSD 34import Network.BSD
35 ( PortNumber 35 ( getProtocolNumber
36 , getHostName
37 , hostName
38 , hostAliases
39 , getProtocolNumber
40 ) 36 )
41import System.IO 37import System.IO
42 ( BufferMode(..) 38 ( BufferMode(..)
@@ -48,16 +44,14 @@ import Data.Conduit
48import qualified Data.Conduit.List as CL 44import qualified Data.Conduit.List as CL
49import qualified Data.Conduit.Binary as CB 45import qualified Data.Conduit.Binary as CB
50import Data.ByteString (ByteString) 46import Data.ByteString (ByteString)
51import qualified Data.ByteString.Char8 as S (pack,putStr,putStrLn,append) 47import qualified Data.ByteString.Char8 as S (putStrLn,append)
52import qualified Data.ByteString.Lazy.Char8 as L 48import qualified Data.ByteString.Lazy.Char8 as L
53 ( putStrLn 49 ( putStrLn
54 , fromChunks 50 , fromChunks
55 , unlines
56 , hPutStrLn
57 ) 51 )
58import Control.Concurrent (forkIO,killThread) 52import Control.Concurrent (forkIO)
59import Control.Concurrent.Async 53import Control.Concurrent.Async
60import Control.Exception 54import 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)
67import Control.Monad.IO.Class 61import Control.Monad.IO.Class
68import Control.Monad.Trans.Class 62import Control.Monad.Trans.Class
69import Control.Monad.Trans.Maybe 63import Control.Monad.Trans.Maybe
70import Todo
71import Control.Monad as Monad
72import Text.XML.Stream.Parse (parseBytes,content) 64import Text.XML.Stream.Parse (parseBytes,content)
73import Text.XML.Stream.Render 65import Text.XML.Stream.Render
74import Data.XML.Types as XML 66import Data.XML.Types as XML
75import qualified Data.Text as S (takeWhile) 67import qualified Data.Text as S (takeWhile)
76import Data.Text.Encoding as S (decodeUtf8,encodeUtf8) 68import Data.Text.Encoding as S (decodeUtf8,encodeUtf8)
77import Data.Text.Lazy.Encoding as L (decodeUtf8,encodeUtf8) 69import Data.Text.Lazy.Encoding as L (decodeUtf8)
78import Data.Text.Lazy (toStrict) 70import Data.Text.Lazy (toStrict)
79import Data.Monoid
80import qualified Data.Sequence as Seq 71import qualified Data.Sequence as Seq
81import Data.Foldable (toList) 72import 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 @@
3module XMPPTypes where 3module XMPPTypes where
4 4
5import Network.Socket 5import 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 )
21import System.IO (Handle)
22import Control.Concurrent.STM (TChan) 19import Control.Concurrent.STM (TChan)
23import qualified Data.ByteString.Char8 as S (ByteString,pack,putStr,putStrLn,append) 20import qualified Data.ByteString.Char8 as S
21 ( ByteString
22 , pack
23 )
24import Data.ByteString.Lazy.Char8 as L 24import Data.ByteString.Lazy.Char8 as L
25 ( ByteString 25 ( ByteString
26 , unpack 26 , unpack
@@ -37,8 +37,7 @@ import Control.DeepSeq
37import ByteStringOperators 37import ByteStringOperators
38import SocketLike 38import SocketLike
39import GetHostByAddr 39import GetHostByAddr
40import Data.Maybe (listToMaybe,catMaybes) 40import Data.Maybe (listToMaybe)
41import Control.Monad.STM
42 41
43class JabberClientSession session where 42class 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)
56import qualified Prelude 56import qualified Prelude
57import Prelude hiding (putStrLn) 57import Prelude hiding (putStrLn)
58import System.Environment 58import System.Environment
59import qualified Text.Show.ByteString as L 59-- import qualified Text.Show.ByteString as L
60import Network.Socket (Family(AF_INET,AF_INET6)) 60import Network.Socket (Family(AF_INET,AF_INET6))
61import Holumbus.Data.MultiMap as MM (MultiMap) 61import Holumbus.Data.MultiMap as MM (MultiMap)
62import qualified Holumbus.Data.MultiMap as MM 62import qualified Holumbus.Data.MultiMap as MM