on master help sign in
Removed warnings
commit9260b1499fb3745b366cfff520548f313598791d authorMichael Snoyman <michael@snoyman.com> dateTue 7 Jun 2011, 14:07 (15 years ago) parentac5b89a
1 file changed+5−7
Network/Wai/Application/Static.hs+5−7
Network/Wai/Application/Static.hs+5−7
@@ -48,9 +48,8 @@ import qualified Data.ByteString.Char8 as S8
4848import qualified Data.ByteString.Lazy as L
4949import Data.ByteString.Lazy.Char8 ()
5050import System.PosixCompat.Files (fileSize, getFileStatus, modificationTime)
51−import System.Posix.Types (FileOffset, EpochTime)
51+import System.Posix.Types (EpochTime)
5252import Control.Monad.IO.Class (liftIO)
53−import Data.Maybe (catMaybes, isNothing, isJust)
5453import qualified Crypto.Hash.MD5 as MD5
5554import Control.Monad (filterM)
5655
@@ -59,8 +58,7 @@ import qualified Text.Blaze.Html5 as H
5958import qualified Text.Blaze.Renderer.Utf8 as HU
6059import qualified Text.Blaze.Html5.Attributes as A
6160
62−import Blaze.ByteString.Builder (toByteString, copyByteString, fromByteString)
63−import Data.Monoid (mappend)
61+import Blaze.ByteString.Builder (toByteString, fromByteString)
6462
6563import Data.Time
6664import Data.Time.Clock.POSIX
@@ -328,7 +326,7 @@ type FileLookup = Maybe (Either Folder File)
328326
329327data Folder = Folder
330328 { folderName :: T.Text
331− , folderContents :: [Either Folder File]
329+ , folderContents :: [Either Folder File] -- FIXME remove?
332330 }
333331
334332data FolderEntry = FolderEntry -- FIXME remove
@@ -444,7 +442,7 @@ embeddedLookup root pieces =
444442 Just (EEFolder y) -> elookup p ps y
445443
446444toEntry :: (T.Text, EmbeddedEntry) -> Either Folder File
447−toEntry (name, EEFolder e) = Left $ Folder name []
445+toEntry (name, EEFolder{}) = Left $ Folder name []
448446toEntry (name, EEFile bs) = Right $ File
449447 { fileGetSize = S8.length bs
450448 , fileToResponse = \s h -> W.ResponseBuilder s h $ fromByteString bs
@@ -643,7 +641,7 @@ defaultListing pieces (Folder _ contents) = do
643641 showFolder (x:xs) = do
644642 let href = concat $ replicate (length xs) "../" :: String
645643 H.a ! A.href (H.toValue href) $ H.toHtml $ showName x
646− " / "
644+ () <- " / "
647645 showFolder xs
648646
649647-- | a function to generate an HTML table showing the contents of a directory on the disk