From: PHO Date: Fri, 9 Dec 2011 04:54:28 +0000 (+0900) Subject: Fix build error X-Git-Tag: RELEASE-0.3~1^2~9 X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=02b5cc7;p=time-http.git Fix build error Ditz-issue: 0a3272772c73cf31486eb2b6691fa38232d3c4c5 --- diff --git a/Data/Time/HTTP/Common.hs b/Data/Time/HTTP/Common.hs index c07065b..c983389 100644 --- a/Data/Time/HTTP/Common.hs +++ b/Data/Time/HTTP/Common.hs @@ -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) <|> diff --git a/Data/Time/HTTP/Internal.hs b/Data/Time/HTTP/Internal.hs index aada8bd..6e0753d 100644 --- a/Data/Time/HTTP/Internal.hs +++ b/Data/Time/HTTP/Internal.hs @@ -12,8 +12,8 @@ import Data.Ascii (AsciiBuilder) import Data.Attoparsec.Char8 import Data.Time import qualified Data.Time.RFC1123.Internal as RFC1123 -import qualified Data.Time.RFC733.Internal as RFC733 -import qualified Data.Time.Asctime as Asctime +import Data.Time.RFC733 +import Data.Time.Asctime import Prelude.Unicode -- |Parse a date and time string in any formats allowed by HTTP\/1.1 @@ -21,8 +21,8 @@ import Prelude.Unicode httpDateAndTime ∷ Parser UTCTime httpDateAndTime = choice [ zonedTimeToUTC <$> try RFC1123.rfc1123DateAndTime - , zonedTimeToUTC <$> try RFC733.rfc733DateAndTime - , localTimeToUTC utc <$> Asctime.asctime + , zonedTimeToUTC <$> try rfc733DateAndTime + , localTimeToUTC utc <$> asctime ] -- |Convert a 'UTCTime' to RFC 1123 date and time string.