From: PHO Date: Sun, 4 Dec 2011 10:53:32 +0000 (+0900) Subject: docs X-Git-Tag: RELEASE-0.3~1^2~11 X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=55924ce;p=time-http.git docs Ditz-issue: 0a3272772c73cf31486eb2b6691fa38232d3c4c5 --- diff --git a/Data/Time/Asctime.hs b/Data/Time/Asctime.hs index f7d7bdd..de9de39 100644 --- a/Data/Time/Asctime.hs +++ b/Data/Time/Asctime.hs @@ -43,6 +43,9 @@ import Prelude.Unicode -- |The phantom type for conversion between ANSI C's @asctime()@ -- string and 'LocalTime'. +-- +-- >>> convertSuccess (LocalTime (ModifiedJulianDay 49662) (TimeOfDay 8 49 37)) +-- Tagged "Sun Nov 6 08:49:37 1994" data Asctime instance ConvertSuccess LocalTime (Tagged Asctime Ascii) where diff --git a/Data/Time/HTTP/Common.hs b/Data/Time/HTTP/Common.hs index 84beeb3..c07065b 100644 --- a/Data/Time/HTTP/Common.hs +++ b/Data/Time/HTTP/Common.hs @@ -358,10 +358,4 @@ parseAttempt f p bs 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