From: pho Date: Tue, 17 Jul 2007 08:14:36 +0000 (+0900) Subject: Supplession of unneeded imports X-Git-Tag: RELEASE-0_2_1~38 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=8e78bc83bfe67a376293c346ae0b30f1a684c787;p=Lucu.git Supplession of unneeded imports darcs-hash:20070717081436-62b54-416b990cee25fb2b2046bc49bc8d0c50463ca796.gz --- diff --git a/Lucu.cabal b/Lucu.cabal index e7be5c7..e7a0e76 100644 --- a/Lucu.cabal +++ b/Lucu.cabal @@ -51,9 +51,9 @@ Extra-Source-Files: data/mime.types examples/HelloWorld.hs examples/Makefile -ghc-options: -fglasgow-exts -fwarn-missing-signatures -funbox-strict-fields -O3 +ghc-options: -fglasgow-exts -fwarn-missing-signatures -fwarn-unused-imports -funbox-strict-fields -O3 --Executable: HelloWorld --Main-Is: HelloWorld.hs --Hs-Source-Dirs: ., examples ---ghc-options: -threaded -fglasgow-exts -O3 \ No newline at end of file +--ghc-options: -threaded -fglasgow-exts -O3 diff --git a/Network/HTTP/Lucu.hs b/Network/HTTP/Lucu.hs index 14d3954..9859e53 100644 --- a/Network/HTTP/Lucu.hs +++ b/Network/HTTP/Lucu.hs @@ -77,7 +77,6 @@ import Network.HTTP.Lucu.Config import Network.HTTP.Lucu.ETag import Network.HTTP.Lucu.Httpd import Network.HTTP.Lucu.MIMEType -import Network.HTTP.Lucu.Request import Network.HTTP.Lucu.Resource hiding (driftTo) import Network.HTTP.Lucu.Resource.Tree import Network.HTTP.Lucu.Response diff --git a/Network/HTTP/Lucu/Abortion.hs b/Network/HTTP/Lucu/Abortion.hs index 4313df3..fd4903d 100644 --- a/Network/HTTP/Lucu/Abortion.hs +++ b/Network/HTTP/Lucu/Abortion.hs @@ -21,7 +21,6 @@ import Data.Dynamic import Network.HTTP.Lucu.Config import Network.HTTP.Lucu.DefaultPage import Network.HTTP.Lucu.Headers -import Network.HTTP.Lucu.HttpVersion import Network.HTTP.Lucu.Request import Network.HTTP.Lucu.Response import {-# SOURCE #-} Network.HTTP.Lucu.Resource diff --git a/Network/HTTP/Lucu/Config.hs b/Network/HTTP/Lucu/Config.hs index 49622b2..b605d81 100644 --- a/Network/HTTP/Lucu/Config.hs +++ b/Network/HTTP/Lucu/Config.hs @@ -5,11 +5,8 @@ module Network.HTTP.Lucu.Config ) where -import qualified Data.Map as M -import Data.Map (Map) import Network import Network.BSD -import Network.HTTP.Lucu.MIMEType import Network.HTTP.Lucu.MIMEType.Guess import Network.HTTP.Lucu.MIMEType.DefaultExtensionMap import System.IO.Unsafe diff --git a/Network/HTTP/Lucu/DefaultPage.hs b/Network/HTTP/Lucu/DefaultPage.hs index a79e47b..c4e82d5 100644 --- a/Network/HTTP/Lucu/DefaultPage.hs +++ b/Network/HTTP/Lucu/DefaultPage.hs @@ -11,7 +11,6 @@ import Control.Arrow.ArrowList import Control.Concurrent.STM import Control.Monad import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) import Data.Maybe import Network import Network.HTTP.Lucu.Config diff --git a/Network/HTTP/Lucu/HttpVersion.hs b/Network/HTTP/Lucu/HttpVersion.hs index 15ead36..e1ed0f3 100644 --- a/Network/HTTP/Lucu/HttpVersion.hs +++ b/Network/HTTP/Lucu/HttpVersion.hs @@ -8,8 +8,6 @@ module Network.HTTP.Lucu.HttpVersion ) where -import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) import Network.HTTP.Lucu.Parser import System.IO diff --git a/Network/HTTP/Lucu/MIMEType/DefaultExtensionMap.hs b/Network/HTTP/Lucu/MIMEType/DefaultExtensionMap.hs index 38c5589..6d33cd6 100644 --- a/Network/HTTP/Lucu/MIMEType/DefaultExtensionMap.hs +++ b/Network/HTTP/Lucu/MIMEType/DefaultExtensionMap.hs @@ -11,7 +11,6 @@ module Network.HTTP.Lucu.MIMEType.DefaultExtensionMap import Network.HTTP.Lucu.MIMEType import Network.HTTP.Lucu.MIMEType.Guess import qualified Data.Map as M -import Data.Map (Map) defaultExtensionMap :: ExtMap defaultExtensionMap diff --git a/Network/HTTP/Lucu/MIMEType/Guess.hs b/Network/HTTP/Lucu/MIMEType/Guess.hs index 65bf3a6..a0ea164 100644 --- a/Network/HTTP/Lucu/MIMEType/Guess.hs +++ b/Network/HTTP/Lucu/MIMEType/Guess.hs @@ -12,7 +12,6 @@ module Network.HTTP.Lucu.MIMEType.Guess where import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) import qualified Data.Map as M import Data.Map (Map) import Data.Maybe @@ -92,7 +91,6 @@ serializeExtMap extMap moduleName variableName imports = [ HsImportDecl undefined (Module "Network.HTTP.Lucu.MIMEType") False Nothing Nothing , HsImportDecl undefined (Module "Network.HTTP.Lucu.MIMEType.Guess") False Nothing Nothing , HsImportDecl undefined (Module "Data.Map") True (Just (Module "M")) Nothing - , HsImportDecl undefined (Module "Data.Map") False Nothing (Just (False, [HsIAbs (HsIdent "Map")])) ] decls = [ HsTypeSig undefined [HsIdent variableName] (HsQualType [] diff --git a/Network/HTTP/Lucu/Parser.hs b/Network/HTTP/Lucu/Parser.hs index 0033eb4..174a289 100644 --- a/Network/HTTP/Lucu/Parser.hs +++ b/Network/HTTP/Lucu/Parser.hs @@ -49,7 +49,6 @@ module Network.HTTP.Lucu.Parser ) where -import Control.Monad import Control.Monad.State import qualified Data.ByteString.Lazy.Char8 as B import Data.ByteString.Lazy.Char8 (ByteString) diff --git a/Network/HTTP/Lucu/Parser/Http.hs b/Network/HTTP/Lucu/Parser/Http.hs index 015c189..cb21d29 100644 --- a/Network/HTTP/Lucu/Parser/Http.hs +++ b/Network/HTTP/Lucu/Parser/Http.hs @@ -16,8 +16,6 @@ module Network.HTTP.Lucu.Parser.Http ) where -import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) import Data.List import Network.HTTP.Lucu.Parser diff --git a/Network/HTTP/Lucu/Postprocess.hs b/Network/HTTP/Lucu/Postprocess.hs index cce46cd..5c4f5d0 100644 --- a/Network/HTTP/Lucu/Postprocess.hs +++ b/Network/HTTP/Lucu/Postprocess.hs @@ -18,7 +18,6 @@ import Network.HTTP.Lucu.Interaction import Network.HTTP.Lucu.RFC1123DateTime import Network.HTTP.Lucu.Request import Network.HTTP.Lucu.Response -import Network.HTTP.Lucu.Utils import System.Time {- diff --git a/Network/HTTP/Lucu/Preprocess.hs b/Network/HTTP/Lucu/Preprocess.hs index 5e1d095..1397950 100644 --- a/Network/HTTP/Lucu/Preprocess.hs +++ b/Network/HTTP/Lucu/Preprocess.hs @@ -47,8 +47,6 @@ import Network.URI -} -import GHC.Conc (unsafeIOToSTM) - preprocess :: Interaction -> STM () preprocess itr = itr `seq` diff --git a/Network/HTTP/Lucu/RFC1123DateTime.hs b/Network/HTTP/Lucu/RFC1123DateTime.hs index 3be2dd4..9962c16 100644 --- a/Network/HTTP/Lucu/RFC1123DateTime.hs +++ b/Network/HTTP/Lucu/RFC1123DateTime.hs @@ -9,12 +9,9 @@ module Network.HTTP.Lucu.RFC1123DateTime where import Control.Monad -import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) import Network.HTTP.Lucu.Format import Network.HTTP.Lucu.Parser import System.Time -import System.Locale month :: [String] month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] diff --git a/Network/HTTP/Lucu/Request.hs b/Network/HTTP/Lucu/Request.hs index bc1c317..b316730 100644 --- a/Network/HTTP/Lucu/Request.hs +++ b/Network/HTTP/Lucu/Request.hs @@ -10,8 +10,6 @@ module Network.HTTP.Lucu.Request ) where -import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) import Network.HTTP.Lucu.Headers import Network.HTTP.Lucu.HttpVersion import Network.HTTP.Lucu.Parser diff --git a/Network/HTTP/Lucu/RequestReader.hs b/Network/HTTP/Lucu/RequestReader.hs index 1cce2d6..639a371 100644 --- a/Network/HTTP/Lucu/RequestReader.hs +++ b/Network/HTTP/Lucu/RequestReader.hs @@ -9,23 +9,19 @@ import Control.Exception import Control.Monad import qualified Data.ByteString.Lazy.Char8 as B import Data.ByteString.Lazy.Char8 (ByteString) -import Data.Map as M -import Data.Map (Map) import Data.Maybe import qualified Data.Sequence as S -import Data.Sequence (Seq, (<|), ViewR(..)) +import Data.Sequence ((<|)) import Network.Socket import Network.HTTP.Lucu.Config import Network.HTTP.Lucu.Chunk import Network.HTTP.Lucu.DefaultPage -import Network.HTTP.Lucu.HttpVersion import Network.HTTP.Lucu.Interaction import Network.HTTP.Lucu.Parser import Network.HTTP.Lucu.Postprocess import Network.HTTP.Lucu.Preprocess import Network.HTTP.Lucu.Request import Network.HTTP.Lucu.Response -import Network.HTTP.Lucu.Resource import Network.HTTP.Lucu.Resource.Tree import Prelude hiding (catch) import System.IO diff --git a/Network/HTTP/Lucu/Resource.hs b/Network/HTTP/Lucu/Resource.hs index 96863f0..bacb00f 100644 --- a/Network/HTTP/Lucu/Resource.hs +++ b/Network/HTTP/Lucu/Resource.hs @@ -132,13 +132,11 @@ import qualified Data.ByteString.Lazy.Char8 as B import Data.ByteString.Lazy.Char8 (ByteString) import Data.List import Data.Maybe -import GHC.Conc (unsafeIOToSTM) import Network.HTTP.Lucu.Abortion import Network.HTTP.Lucu.Config import Network.HTTP.Lucu.DefaultPage import Network.HTTP.Lucu.ETag import qualified Network.HTTP.Lucu.Headers as H -import Network.HTTP.Lucu.HttpVersion import Network.HTTP.Lucu.Interaction import Network.HTTP.Lucu.Parser import Network.HTTP.Lucu.Postprocess diff --git a/Network/HTTP/Lucu/Resource/Tree.hs b/Network/HTTP/Lucu/Resource/Tree.hs index 9af5fd5..c2f6add 100644 --- a/Network/HTTP/Lucu/Resource/Tree.hs +++ b/Network/HTTP/Lucu/Resource/Tree.hs @@ -22,7 +22,6 @@ import Data.Map (Map) import Data.Maybe import Network.HTTP.Lucu.Abortion import Network.HTTP.Lucu.Config -import Network.HTTP.Lucu.MIMEType import Network.HTTP.Lucu.Request import Network.HTTP.Lucu.Resource import Network.HTTP.Lucu.Response diff --git a/Network/HTTP/Lucu/ResponseWriter.hs b/Network/HTTP/Lucu/ResponseWriter.hs index 00e6f46..7891db1 100644 --- a/Network/HTTP/Lucu/ResponseWriter.hs +++ b/Network/HTTP/Lucu/ResponseWriter.hs @@ -5,13 +5,12 @@ module Network.HTTP.Lucu.ResponseWriter where import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) +import Control.Concurrent import Control.Concurrent.STM import Control.Exception import Control.Monad -import Data.Maybe import qualified Data.Sequence as S -import Data.Sequence (Seq, ViewR(..)) +import Data.Sequence (ViewR(..)) import Network.HTTP.Lucu.Config import Network.HTTP.Lucu.Format import Network.HTTP.Lucu.HttpVersion @@ -21,10 +20,6 @@ import Network.HTTP.Lucu.Response import Prelude hiding (catch) import System.IO -import Control.Concurrent -import Debug.Trace -import GHC.Conc (unsafeIOToSTM) - responseWriter :: Config -> Handle -> InteractionQueue -> ThreadId -> IO () responseWriter cnf h tQueue readerTID diff --git a/Network/HTTP/Lucu/StaticFile.hs b/Network/HTTP/Lucu/StaticFile.hs index a83f285..3b8222f 100644 --- a/Network/HTTP/Lucu/StaticFile.hs +++ b/Network/HTTP/Lucu/StaticFile.hs @@ -13,7 +13,6 @@ module Network.HTTP.Lucu.StaticFile import Control.Monad import Control.Monad.Trans import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) import Network.HTTP.Lucu.Abortion import Network.HTTP.Lucu.Config import Network.HTTP.Lucu.ETag diff --git a/Network/HTTP/Lucu/Utils.hs b/Network/HTTP/Lucu/Utils.hs index b22780b..d6e46f1 100644 --- a/Network/HTTP/Lucu/Utils.hs +++ b/Network/HTTP/Lucu/Utils.hs @@ -12,11 +12,8 @@ module Network.HTTP.Lucu.Utils ) where -import Control.Monad.Trans import Data.Char import Data.List -import Foreign -import Foreign.C import Network.URI -- |> splitBy (== ':') "ab:c:def"