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)
show2 h ⊕ show2 m
read4digitsTZ ∷ Parser TimeZone
+{-# INLINEABLE read4digitsTZ #-}
read4digitsTZ
= do sign ← (char '+' *> return 1)
<|>
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