From 0f2ea9afe28edb64fe2ade7e2f6908a54e5522ad Mon Sep 17 00:00:00 2001 From: Conrad Parker Date: Wed, 22 Feb 2012 12:08:51 +0800 Subject: [PATCH] Remove unused imports --- Network/BSD.hsc | 7 ++++--- Network/Socket.hsc | 9 ++++----- Network/URI.hs | 9 ++++----- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Network/BSD.hsc b/Network/BSD.hsc index 68e95ee2..4dc2cebf 100644 --- a/Network/BSD.hsc +++ b/Network/BSD.hsc @@ -98,9 +98,10 @@ import Network.Socket import Control.Concurrent (MVar, newMVar, withMVar) import Control.Exception (catch) -import Foreign.C.Error (throwErrnoIfMinus1, throwErrnoIfMinus1_) -import Foreign.C.String (CString, peekCString, peekCStringLen, withCString) -import Foreign.C.Types ( CChar, CShort ) +import Foreign.C.String (CString, peekCString, withCString) +#if defined(HAVE_WINSOCK2_H) && !defined(cygwin32_HOST_OS) +import Foreign.C.Types ( CShort ) +#endif #if __GLASGOW_HASKELL__ >= 703 import Foreign.C.Types ( CInt(..), CULong(..), CSize(..) ) #else diff --git a/Network/Socket.hsc b/Network/Socket.hsc index 3bc983d5..26284b97 100644 --- a/Network/Socket.hsc +++ b/Network/Socket.hsc @@ -177,12 +177,11 @@ import Hugs.IO ( openFd ) import Data.Bits import Data.List (foldl') -import Data.Word (Word8, Word16, Word32) -import Foreign.Ptr (Ptr, castPtr, nullPtr, plusPtr) +import Data.Word (Word16, Word32) +import Foreign.Ptr (Ptr, castPtr, nullPtr) import Foreign.Storable (Storable(..)) import Foreign.C.Error -import Foreign.C.String (CString, withCString, peekCString, peekCStringLen, - castCharToCChar) +import Foreign.C.String (CString, withCString, peekCString, peekCStringLen) import Foreign.C.Types (CUInt, CChar) #if __GLASGOW_HASKELL__ >= 703 import Foreign.C.Types (CInt(..), CSize(..)) @@ -190,7 +189,7 @@ import Foreign.C.Types (CInt(..), CSize(..)) import Foreign.C.Types (CInt, CSize) #endif import Foreign.Marshal.Alloc ( alloca, allocaBytes ) -import Foreign.Marshal.Array ( peekArray, pokeArray, pokeArray0 ) +import Foreign.Marshal.Array ( peekArray ) import Foreign.Marshal.Utils ( maybeWith, with ) import System.IO diff --git a/Network/URI.hs b/Network/URI.hs index 9c3a0418..f41541b9 100644 --- a/Network/URI.hs +++ b/Network/URI.hs @@ -113,16 +113,15 @@ module Network.URI ) where import Text.ParserCombinators.Parsec - ( GenParser(..), ParseError(..) + ( GenParser, ParseError , parse, (<|>), (), try - , option, many, many1, count, notFollowedBy, lookAhead - , char, satisfy, oneOf, string, letter, digit, hexDigit, eof + , option, many, many1, count, notFollowedBy + , char, satisfy, oneOf, string, eof , unexpected ) import Control.Monad (MonadPlus(..)) -import Data.Char (ord, chr, isHexDigit, isSpace, toLower, toUpper, digitToInt) -import Data.Maybe (isJust) +import Data.Char (ord, chr, isHexDigit, toLower, toUpper, digitToInt) import Debug.Trace (trace) import Numeric (showIntAtBase)