]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Headers.hs
Cosmetic changes suggested by hlint
[Lucu.git] / Network / HTTP / Lucu / Headers.hs
index febbdb6271ae362dd5e3c9a57fdff0975f68771f..163f6bcf55bb2a9e4f78ef680919be07df354246 100644 (file)
@@ -21,6 +21,7 @@ import           Data.Char
 import           Data.List
 import           Data.Map (Map)
 import qualified Data.Map as M
+import           Data.Ord
 import           Data.Word
 import           Foreign.ForeignPtr
 import           Foreign.Ptr
@@ -76,7 +77,7 @@ noCaseCmp' p1 l1 p2 l2
     | otherwise
         = do c1 <- peek p1
              c2 <- peek p2
-             case toLower (w2c c1) `compare` toLower (w2c c2) of
+             case comparing (toLower . w2c) c1 c2 of
                EQ -> noCaseCmp' (p1 `plusPtr` 1) (l1 - 1) (p2 `plusPtr` 1) (l2 - 1)
                x  -> return x
 
@@ -194,7 +195,7 @@ headersP = do xs <- many header
       normalize :: String -> String
       normalize = trimBody . trim isWhiteSpace
 
-      trimBody = foldr (++) []
+      trimBody = concat
                  . map (\ s -> if head s == ' ' then
                                    " "
                                else