{-# LANGUAGE CPP #-}
module Data.Time.Format.Compat (
FormatTime(),formatTime,
parseTimeM,
parseTimeOrError,
readSTime, readPTime,
parseTime, readTime, readsTime,
ParseTime(),
TimeLocale(..),
defaultTimeLocale,
iso8601DateFormat,
rfc822DateFormat,
) where
import Data.Time.Orphans ()
#if !(MIN_VERSION_time(1,9,0))
import Data.Time.Format hiding (parseTimeM)
#else
import Data.Time.Format
#endif
import qualified Control.Monad.Fail as Fail
import qualified Data.Time.Format
#if !MIN_VERSION_time(1,9,0)
parseTimeM
:: (Fail.MonadFail m, ParseTime t)
=> Bool
-> TimeLocale
-> String
-> String
-> m t
parseTimeM = Data.Time.Format.parseTimeM
#endif
#if MIN_VERSION_time(1,10,0)
{-# DEPRECATED parseTime "use \"parseTimeM True\" instead" #-}
parseTime :: ParseTime t =>
TimeLocale
-> String
-> String
-> Maybe t
parseTime :: forall t. ParseTime t => TimeLocale -> String -> String -> Maybe t
parseTime = Bool -> TimeLocale -> String -> String -> Maybe t
forall (m :: * -> *) t.
(MonadFail m, ParseTime t) =>
Bool -> TimeLocale -> String -> String -> m t
parseTimeM Bool
True
{-# DEPRECATED readTime "use \"parseTimeOrError True\" instead" #-}
readTime :: ParseTime t =>
TimeLocale
-> String
-> String
-> t
readTime :: forall t. ParseTime t => TimeLocale -> String -> String -> t
readTime = Bool -> TimeLocale -> String -> String -> t
forall t.
ParseTime t =>
Bool -> TimeLocale -> String -> String -> t
parseTimeOrError Bool
True
{-# DEPRECATED readsTime "use \"readSTime True\" instead" #-}
readsTime :: ParseTime t =>
TimeLocale
-> String
-> ReadS t
readsTime :: forall t. ParseTime t => TimeLocale -> String -> ReadS t
readsTime = Bool -> TimeLocale -> String -> ReadS t
forall t. ParseTime t => Bool -> TimeLocale -> String -> ReadS t
readSTime Bool
True
#endif