]> gitweb @ CieloNegro.org - time-http.git/blobdiff - Data/Time/Format/RFC1123.hs
Rename Asctime -> C
[time-http.git] / Data / Time / Format / RFC1123.hs
index 970dff1bf434b47487ea87a248fb47b57c223bc6..1d4f28eb99c5d328d8d8dc5357d0d8a43ba19231 100644 (file)
@@ -8,8 +8,8 @@
 -- |This module provides functions to parse and format RFC 1123 date
 -- and time strings (<http://tools.ietf.org/html/rfc1123#page-55>).
 --
--- 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