)
where
unescape ∷ String → ByteString
- unescape = Strict.pack ∘ unEscapeString ∘ map plusToSpace
+ unescape = Strict.pack ∘ unEscapeString ∘ (plusToSpace <$>)
plusToSpace ∷ Char → Char
plusToSpace '+' = ' '
= 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"
where
clockTimeToUTC ∷ ClockTime → UTCTime
clockTimeToUTC (TOD sec picoSec)
- = posixSecondsToUTCTime
- $ fromRational
+ = posixSecondsToUTCTime ∘ fromRational
$ sec % 1 + picoSec % (1000 ⋅ 1000 ⋅ 1000 ⋅ 1000)