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
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
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
)
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
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
)
where
-import qualified Data.ByteString.Lazy.Char8 as B
-import Data.ByteString.Lazy.Char8 (ByteString)
import Network.HTTP.Lucu.Parser
import System.IO
import Network.HTTP.Lucu.MIMEType
import Network.HTTP.Lucu.MIMEType.Guess
import qualified Data.Map as M
-import Data.Map (Map)
defaultExtensionMap :: ExtMap
defaultExtensionMap
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
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 []
)
where
-import Control.Monad
import Control.Monad.State
import qualified Data.ByteString.Lazy.Char8 as B
import Data.ByteString.Lazy.Char8 (ByteString)
)
where
-import qualified Data.ByteString.Lazy.Char8 as B
-import Data.ByteString.Lazy.Char8 (ByteString)
import Data.List
import Network.HTTP.Lucu.Parser
import Network.HTTP.Lucu.RFC1123DateTime
import Network.HTTP.Lucu.Request
import Network.HTTP.Lucu.Response
-import Network.HTTP.Lucu.Utils
import System.Time
{-
-}
-import GHC.Conc (unsafeIOToSTM)
-
preprocess :: Interaction -> STM ()
preprocess itr
= itr `seq`
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"]
)
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
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
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
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
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
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
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
)
where
-import Control.Monad.Trans
import Data.Char
import Data.List
-import Foreign
-import Foreign.C
import Network.URI
-- |> splitBy (== ':') "ab:c:def"