Permalink
Browse files

Eliminate warnings on GHC 7.2

  • Loading branch information...
1 parent 538d28a commit 30bb123238cf9cb37b95f7a62cfb5992d10a59c5 @maoe maoe committed Nov 19, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 src-execs/Server.hs
View
@@ -11,7 +11,7 @@ import Scion.Cabal
import Scion.Session
import Control.Applicative
---import Control.Exception ( throwIO, handle, IOException )
+import Control.Exception ( catch )
import Data.AttoLisp ( FromLisp(..), ToLisp(..) )
import Data.Bits ( shiftL, (.|.) )
import Data.Maybe ( isNothing )
@@ -22,14 +22,16 @@ import Network ( listenOn, PortID(..) )
import Network.Socket hiding (send, sendTo, recv, recvFrom)
import Network.Socket.ByteString
import Numeric ( showHex )
+import Prelude hiding (catch)
import System.IO
import System.FilePath.Canonical
import qualified Network.Socket.ByteString.Lazy as NL
import qualified Data.AttoLisp as L
import qualified Data.Attoparsec as A
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
-import qualified Data.ByteString.Char8 as S ( pack )
+import qualified Data.ByteString.Char8 as S ( pack, putStrLn )
+import qualified Data.ByteString.Lazy.Char8 as L
import qualified Data.MultiSet as MS
import qualified Data.Text as T
@@ -93,7 +95,7 @@ mainLoop sock Lisp = runScion $ do
Just len -> do
msg <- io $ recv sock len
io $ putStr $ "==> [" ++ show len ++ "] "
- io $ B.putStrLn msg
+ io $ S.putStrLn msg
case parseRequest msg of
Left err_msg -> do
io $ putStrLn $ "ParseError: " ++ err_msg
@@ -123,7 +125,7 @@ sendResponse sock reqId resp =
in do
let len = (fromIntegral $ BL.length str)
putStr $ "<== [" ++ show len ++ "] "
- BL.putStrLn str
+ L.putStrLn str
n <- send sock (encodeLen len)
m <- NL.send sock str
putStrLn $ " [Sent: " ++ show n ++ "+" ++ show m ++ "]"

0 comments on commit 30bb123

Please sign in to comment.