]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/MIMEType/Guess.hs
Suppress unused-do-bind warnings which GHC 6.12.1 emits
[Lucu.git] / Network / HTTP / Lucu / MIMEType / Guess.hs
index d6c4958db21f563bbdc6bd07af3cb02d809f8ffc..145adf8ad18eb94ce2371ee91336cd2ebd949cc5 100644 (file)
@@ -21,7 +21,6 @@ import           Network.HTTP.Lucu.MIMEType
 import           Network.HTTP.Lucu.Parser
 import           Network.HTTP.Lucu.Parser.Http
 import           Network.HTTP.Lucu.Utils
-import           System.IO
 
 -- |'Data.Map.Map' from extension to MIME Type.
 type ExtMap = Map String MIMEType
@@ -56,14 +55,14 @@ extMapP = do xs <- many (comment <|> validLine <|> emptyLine)
     where
       spc = oneOf " \t"
 
-      comment = do many spc
-                   char '#'
-                   many $ satisfy (/= '\n')
-                   return Nothing
+      comment = many spc >>
+                char '#' >>
+                ( many $ satisfy (/= '\n') ) >>
+                return Nothing
 
-      validLine = do many spc
+      validLine = do _    <- many spc
                      mime <- mimeTypeP
-                     many spc
+                     _    <- many spc
                      exts <- sepBy token (many spc)
                      return $ Just (mime, exts)
 
@@ -102,9 +101,9 @@ serializeExtMap extMap moduleName variableName
                                   [] (HsUnGuardedRhs extMapExp) []]
                      ]
           extMapExp = HsApp (HsVar (Qual (Module "M") (HsIdent "fromList"))) (HsList records)
-          comment =    "{- !!! WARNING !!!\n"
-                    ++ "   This file is automatically generated.\n"
-                    ++ "   DO NOT EDIT BY HAND OR YOU WILL REGRET -}\n\n"
+          comment   =    "{- !!! WARNING !!!\n"
+                      ++ "   This file is automatically generated.\n"
+                      ++ "   DO NOT EDIT BY HAND OR YOU WILL REGRET -}\n\n"
       in
         comment ++ prettyPrint hsModule ++ "\n"
     where