From 02b5cc7bb95b32a2034afac3e918ff610c05f337 Mon Sep 17 00:00:00 2001 From: PHO Date: Fri, 9 Dec 2011 13:54:28 +0900 Subject: [PATCH] Fix build error Ditz-issue: 0a3272772c73cf31486eb2b6691fa38232d3c4c5 --- Data/Time/HTTP/Common.hs | 2 ++ Data/Time/HTTP/Internal.hs | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) 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. -- 2.40.0