]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Utils.hs
hlint
[Lucu.git] / Network / HTTP / Lucu / Utils.hs
index 8722ecb1a7264ebd450dff106aa283b0d423de0b..bfa2acfb72282d76a2dad31ed2871c28c0709fed 100644 (file)
@@ -86,7 +86,7 @@ parseWWWFormURLEncoded src
                             )
     where
       unescape ∷ String → ByteString
-      unescape = Strict.pack ∘ unEscapeString ∘ map plusToSpace
+      unescape = Strict.pack ∘ unEscapeString ∘ (plusToSpace <$>)
 
       plusToSpace ∷ Char → Char
       plusToSpace '+' = ' '
@@ -99,7 +99,7 @@ splitPathInfo uri
     = let reqPathStr = uriPath uri
           reqPath    = [unEscapeString x | x ← splitBy (≡ '/') reqPathStr, (¬) (null x)]
       in
-        map Strict.pack reqPath
+        Strict.pack <$> reqPath
 
 -- |>>> trim "  ab c d "
 -- "ab c d"
@@ -142,6 +142,5 @@ getLastModified = (clockTimeToUTC <$>) ∘ getModificationTime
     where
       clockTimeToUTC ∷ ClockTime → UTCTime
       clockTimeToUTC (TOD sec picoSec)
-          = posixSecondsToUTCTime
-            $ fromRational
+          = posixSecondsToUTCTime ∘ fromRational
             $ sec % 1 + picoSec % (1000 ⋅ 1000 ⋅ 1000 ⋅ 1000)