X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FInteraction.hs;fp=Network%2FHTTP%2FLucu%2FInteraction.hs;h=35c9f06493d45c4cb92f65d9271c82280100d8fe;hp=ec9207032ce845a0fb68e0bd963a8b08d3953fd1;hb=3b448555e621530c3483f03b4b5156dc606b2035;hpb=f093019cb10a88fee13b8c99d05b60f895ceb01f diff --git a/Network/HTTP/Lucu/Interaction.hs b/Network/HTTP/Lucu/Interaction.hs index ec92070..35c9f06 100644 --- a/Network/HTTP/Lucu/Interaction.hs +++ b/Network/HTTP/Lucu/Interaction.hs @@ -26,6 +26,7 @@ module Network.HTTP.Lucu.Interaction , mkInteractionQueue , getCurrentDate + , formatUTCTime ) where import Blaze.ByteString.Builder (Builder) @@ -35,8 +36,8 @@ import Data.Ascii (Ascii) import Data.ByteString (ByteString) import Data.Convertible.Base import Data.Monoid.Unicode -import Data.Proxy import Data.Sequence (Seq) +import Data.Tagged import Data.Time import Data.Time.Format.HTTP import Data.Typeable @@ -248,4 +249,11 @@ mkInteractionQueue = newTVarIO (∅) getCurrentDate ∷ IO Ascii {-# INLINE getCurrentDate #-} -getCurrentDate = flip proxy http ∘ cs <$> getCurrentTime +getCurrentDate = formatUTCTime <$> getCurrentTime + +formatUTCTime ∷ UTCTime → Ascii +{-# INLINE formatUTCTime #-} +formatUTCTime = cs' ∘ Tagged + where + cs' ∷ Tagged HTTP UTCTime → Ascii + cs' = cs