]> gitweb @ CieloNegro.org - time-http.git/blobdiff - Data/Time/HTTP/Common.hs
Fix build error
[time-http.git] / Data / Time / HTTP / Common.hs
index 84beeb3665cd9439f66f85bb5bae18197dfbe187..c98338988bdaf17e7d69fb1a8b92d0a4de2e8e46 100644 (file)
@@ -258,6 +258,7 @@ digit' = fromIntegral <$> fromC <$> P.digit
       fromC c = ord c - ord '0'
 
 show4digitsTZ ∷ TimeZone → AsciiBuilder
+{-# INLINEABLE show4digitsTZ #-}
 show4digitsTZ tz
     = case timeZoneMinutes tz of
         offset | offset <  0 → A.toAsciiBuilder "-" ⊕ showTZ' (negate offset)
@@ -270,6 +271,7 @@ show4digitsTZ tz
               show2 h ⊕ show2 m
 
 read4digitsTZ ∷ Parser TimeZone
+{-# INLINEABLE read4digitsTZ #-}
 read4digitsTZ
     = do sign   ← (char '+' *> return 1)
                   <|>
@@ -358,10 +360,4 @@ parseAttempt f p bs
 
 parseAttempt' ∷ Parser α → Ascii → Attempt α
 {-# INLINE parseAttempt' #-}
-parseAttempt' p a = parseAttempt h p bs
-    where
-      h ∷ String → StringException
-      h _ = StringException $ A.toString a
-
-      bs ∷ ByteString
-      bs = A.toByteString a
+parseAttempt' = (∘ A.toByteString) ∘ parseAttempt StringException