]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Parser/Http.hs
Cosmetic changes suggested by hlint
[Lucu.git] / Network / HTTP / Lucu / Parser / Http.hs
index 77dbe7f225bb2b6c3950b497815efa077d6c98b2..f6c80dc8072f65abb76deec29c6fc0f6addc476f 100644 (file)
@@ -20,14 +20,15 @@ module Network.HTTP.Lucu.Parser.Http
 import           Data.List
 import           Network.HTTP.Lucu.Parser
 
--- |@'isCtl' c@ is False iff @0x20 <= @c@ < 0x7F@.
+-- |@'isCtl' c@ is 'Prelude.False' iff @0x20 <= @c@ < 0x7F@.
 isCtl :: Char -> Bool
 isCtl c
     | c <  '\x1f' = True
     | c >= '\x7f' = True
     | otherwise   = False
 
--- |@'isSeparator' c@ is True iff c is one of HTTP separators.
+-- |@'isSeparator' c@ is 'Prelude.True' iff c is one of HTTP
+-- separators.
 isSeparator :: Char -> Bool
 isSeparator '('  = True
 isSeparator ')'  = True
@@ -50,7 +51,7 @@ isSeparator ' '  = True
 isSeparator '\t' = True
 isSeparator _    = False
 
--- |@'isChar' c@ is True iff @c <= 0x7f@.
+-- |@'isChar' c@ is 'Prelude.True' iff @c <= 0x7f@.
 isChar :: Char -> Bool
 isChar c
     | c <= '\x7f' = True
@@ -86,7 +87,7 @@ lws = do s  <- option "" crlf
 
 -- |'text' accepts one character which doesn't satisfy 'isCtl'.
 text :: Parser Char
-text = satisfy (\ c -> not (isCtl c))
+text = satisfy (not . isCtl)
 
 -- |'separator' accepts one character which satisfies 'isSeparator'.
 separator :: Parser Char
@@ -103,7 +104,7 @@ quotedStr = do char '"'
       qdtext = do c <- satisfy (/= '"')
                   return [c]
 
-      quotedPair = do q <- char '\\'
+      quotedPair = do char '\\'
                       c <- satisfy isChar
                       return [c]
 
@@ -111,14 +112,14 @@ quotedStr = do char '"'
 qvalue :: Parser Double
 qvalue = do x  <- char '0'
             xs <- option ""
-                  $ do x  <- char '.'
-                       xs <- many digit -- 本當は三文字までに制限
-                       return (x:xs)
+                  $ do y  <- char '.'
+                       ys <- many digit -- 本當は三文字までに制限
+                       return (y:ys)
             return $ read (x:xs)
          <|>
          do x  <- char '1'
             xs <- option ""
-                  $ do x  <- char '.'
-                       xs <- many (char '0') -- 本當は三文字までに制限
-                       return (x:xs)
+                  $ do y  <- char '.'
+                       ys <- many (char '0') -- 本當は三文字までに制限
+                       return (y:ys)
             return $ read (x:xs)