{-# LANGUAGE DeriveDataTypeable #-}
module Data.Time.Zones.Types (
TZ(..),
utcTZ,
) where
import Control.DeepSeq
import Data.Data
import Data.Default
import Data.Int
import qualified Data.Vector as VB
import qualified Data.Vector.Unboxed as VU
data TZ = TZ {
_tzTrans :: !(VU.Vector Int64),
_tzDiffs :: !(VU.Vector Int),
_tzInfos :: !(VB.Vector (Bool, String))
} deriving (Eq, Show, Typeable, Data, Read)
instance NFData TZ where
rnf (TZ { _tzInfos = infos }) = rnf infos
utcTZ :: TZ
utcTZ = TZ (VU.singleton minBound) (VU.singleton 0) (VB.singleton (False, "UTC"))
instance Default TZ where
def = utcTZ