X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=time-http.git;a=blobdiff_plain;f=Data%2FTime%2FFormat%2FRFC1123.hs;h=1d4f28eb99c5d328d8d8dc5357d0d8a43ba19231;hp=970dff1bf434b47487ea87a248fb47b57c223bc6;hb=feaeeec;hpb=91c2402d530afff7f1fd4eee333f84cbe18d1014 diff --git a/Data/Time/Format/RFC1123.hs b/Data/Time/Format/RFC1123.hs index 970dff1..1d4f28e 100644 --- a/Data/Time/Format/RFC1123.hs +++ b/Data/Time/Format/RFC1123.hs @@ -8,8 +8,8 @@ -- |This module provides functions to parse and format RFC 1123 date -- and time strings (). -- --- The format is basically same as RFC 822, but the syntax for @date@ --- is changed from: +-- The format is basically the same as RFC 822, but the syntax for +-- @date@ is changed from: -- -- > year ::= 2DIGIT -- @@ -18,6 +18,7 @@ -- > year ::= 4DIGIT module Data.Time.Format.RFC1123 ( RFC1123 + , rfc1123 , rfc1123DateAndTime ) where @@ -27,6 +28,7 @@ import qualified Data.Ascii as A import Data.Attoparsec.Char8 import Data.Convertible.Base import Data.Monoid.Unicode +import Data.Proxy import Data.Tagged import Data.Time import Data.Time.Calendar.WeekDate @@ -41,6 +43,12 @@ import Prelude.Unicode -- Tagged "Sun, 06 Nov 1994 08:49:37 GMT" data RFC1123 +-- |The proxy for conversions between RFC 1123 date and time strings +-- and 'ZonedTime'. +rfc1123 ∷ Proxy RFC1123 +{-# INLINE CONLIKE rfc1123 #-} +rfc1123 = Proxy + instance ConvertSuccess ZonedTime (Tagged RFC1123 Ascii) where {-# INLINE convertSuccess #-} convertSuccess = (A.fromAsciiBuilder <$>) ∘ cs