{-# LANGUAGE CPP, DeriveDataTypeable #-}
module Data.Time.Clock.TAI.Compat (
AbsoluteTime,taiEpoch,addAbsoluteTime,diffAbsoluteTime,
taiNominalDayStart,
LeapSecondMap',
utcDayLength,utcToTAITime,taiToUTCTime,
taiClock,
) where
import Data.Time.Orphans ()
import Data.Time.Compat
import Data.Time.Clock.TAI
#if MIN_VERSION_time(1,7,0)
type LeapSecondMap' = LeapSecondMap
#else
type LeapSecondMap' = LeapSecondTable
#endif
#if !(MIN_VERSION_time(1,8,0))
taiNominalDayStart :: Day -> AbsoluteTime
taiNominalDayStart (ModifiedJulianDay ds) =
addAbsoluteTime (secondsToDiffTime (ds * 86400)) taiEpoch
taiClock :: Maybe (DiffTime,IO AbsoluteTime)
taiClock = Nothing
#endif