{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Time.Types
(
NanoSeconds(..)
, Seconds(..)
, Minutes(..)
, Hours(..)
, TimeInterval(..)
, Month(..)
, WeekDay(..)
, TimezoneOffset(..)
, timezoneOffsetToSeconds
, timezone_UTC
, Elapsed(..)
, ElapsedP(..)
, Date(..)
, TimeOfDay(..)
, DateTime(..)
) where
import Data.Int
import Data.Data
import Data.Ratio
import Control.DeepSeq
import Data.Hourglass.Utils (pad2)
class TimeInterval i where
toSeconds :: i -> Seconds
fromSeconds :: Seconds -> (i, Seconds)
newtype NanoSeconds = NanoSeconds Int64
deriving (ReadPrec [NanoSeconds]
ReadPrec NanoSeconds
Int -> ReadS NanoSeconds
ReadS [NanoSeconds]
(Int -> ReadS NanoSeconds)
-> ReadS [NanoSeconds]
-> ReadPrec NanoSeconds
-> ReadPrec [NanoSeconds]
-> Read NanoSeconds
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NanoSeconds]
$creadListPrec :: ReadPrec [NanoSeconds]
readPrec :: ReadPrec NanoSeconds
$creadPrec :: ReadPrec NanoSeconds
readList :: ReadS [NanoSeconds]
$creadList :: ReadS [NanoSeconds]
readsPrec :: Int -> ReadS NanoSeconds
$creadsPrec :: Int -> ReadS NanoSeconds
Read,NanoSeconds -> NanoSeconds -> Bool
(NanoSeconds -> NanoSeconds -> Bool)
-> (NanoSeconds -> NanoSeconds -> Bool) -> Eq NanoSeconds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NanoSeconds -> NanoSeconds -> Bool
$c/= :: NanoSeconds -> NanoSeconds -> Bool
== :: NanoSeconds -> NanoSeconds -> Bool
$c== :: NanoSeconds -> NanoSeconds -> Bool
Eq,Eq NanoSeconds
Eq NanoSeconds
-> (NanoSeconds -> NanoSeconds -> Ordering)
-> (NanoSeconds -> NanoSeconds -> Bool)
-> (NanoSeconds -> NanoSeconds -> Bool)
-> (NanoSeconds -> NanoSeconds -> Bool)
-> (NanoSeconds -> NanoSeconds -> Bool)
-> (NanoSeconds -> NanoSeconds -> NanoSeconds)
-> (NanoSeconds -> NanoSeconds -> NanoSeconds)
-> Ord NanoSeconds
NanoSeconds -> NanoSeconds -> Bool
NanoSeconds -> NanoSeconds -> Ordering
NanoSeconds -> NanoSeconds -> NanoSeconds
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: NanoSeconds -> NanoSeconds -> NanoSeconds
$cmin :: NanoSeconds -> NanoSeconds -> NanoSeconds
max :: NanoSeconds -> NanoSeconds -> NanoSeconds
$cmax :: NanoSeconds -> NanoSeconds -> NanoSeconds
>= :: NanoSeconds -> NanoSeconds -> Bool
$c>= :: NanoSeconds -> NanoSeconds -> Bool
> :: NanoSeconds -> NanoSeconds -> Bool
$c> :: NanoSeconds -> NanoSeconds -> Bool
<= :: NanoSeconds -> NanoSeconds -> Bool
$c<= :: NanoSeconds -> NanoSeconds -> Bool
< :: NanoSeconds -> NanoSeconds -> Bool
$c< :: NanoSeconds -> NanoSeconds -> Bool
compare :: NanoSeconds -> NanoSeconds -> Ordering
$ccompare :: NanoSeconds -> NanoSeconds -> Ordering
$cp1Ord :: Eq NanoSeconds
Ord,Integer -> NanoSeconds
NanoSeconds -> NanoSeconds
NanoSeconds -> NanoSeconds -> NanoSeconds
(NanoSeconds -> NanoSeconds -> NanoSeconds)
-> (NanoSeconds -> NanoSeconds -> NanoSeconds)
-> (NanoSeconds -> NanoSeconds -> NanoSeconds)
-> (NanoSeconds -> NanoSeconds)
-> (NanoSeconds -> NanoSeconds)
-> (NanoSeconds -> NanoSeconds)
-> (Integer -> NanoSeconds)
-> Num NanoSeconds
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> NanoSeconds
$cfromInteger :: Integer -> NanoSeconds
signum :: NanoSeconds -> NanoSeconds
$csignum :: NanoSeconds -> NanoSeconds
abs :: NanoSeconds -> NanoSeconds
$cabs :: NanoSeconds -> NanoSeconds
negate :: NanoSeconds -> NanoSeconds
$cnegate :: NanoSeconds -> NanoSeconds
* :: NanoSeconds -> NanoSeconds -> NanoSeconds
$c* :: NanoSeconds -> NanoSeconds -> NanoSeconds
- :: NanoSeconds -> NanoSeconds -> NanoSeconds
$c- :: NanoSeconds -> NanoSeconds -> NanoSeconds
+ :: NanoSeconds -> NanoSeconds -> NanoSeconds
$c+ :: NanoSeconds -> NanoSeconds -> NanoSeconds
Num,Typeable NanoSeconds
DataType
Constr
Typeable NanoSeconds
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NanoSeconds -> c NanoSeconds)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NanoSeconds)
-> (NanoSeconds -> Constr)
-> (NanoSeconds -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NanoSeconds))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NanoSeconds))
-> ((forall b. Data b => b -> b) -> NanoSeconds -> NanoSeconds)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NanoSeconds -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NanoSeconds -> r)
-> (forall u. (forall d. Data d => d -> u) -> NanoSeconds -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> NanoSeconds -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds)
-> Data NanoSeconds
NanoSeconds -> DataType
NanoSeconds -> Constr
(forall b. Data b => b -> b) -> NanoSeconds -> NanoSeconds
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NanoSeconds -> c NanoSeconds
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NanoSeconds
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NanoSeconds -> u
forall u. (forall d. Data d => d -> u) -> NanoSeconds -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NanoSeconds -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NanoSeconds -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NanoSeconds
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NanoSeconds -> c NanoSeconds
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NanoSeconds)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NanoSeconds)
$cNanoSeconds :: Constr
$tNanoSeconds :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds
gmapMp :: (forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds
gmapM :: (forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NanoSeconds -> m NanoSeconds
gmapQi :: Int -> (forall d. Data d => d -> u) -> NanoSeconds -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NanoSeconds -> u
gmapQ :: (forall d. Data d => d -> u) -> NanoSeconds -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NanoSeconds -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NanoSeconds -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NanoSeconds -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NanoSeconds -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NanoSeconds -> r
gmapT :: (forall b. Data b => b -> b) -> NanoSeconds -> NanoSeconds
$cgmapT :: (forall b. Data b => b -> b) -> NanoSeconds -> NanoSeconds
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NanoSeconds)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NanoSeconds)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c NanoSeconds)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NanoSeconds)
dataTypeOf :: NanoSeconds -> DataType
$cdataTypeOf :: NanoSeconds -> DataType
toConstr :: NanoSeconds -> Constr
$ctoConstr :: NanoSeconds -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NanoSeconds
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NanoSeconds
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NanoSeconds -> c NanoSeconds
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NanoSeconds -> c NanoSeconds
$cp1Data :: Typeable NanoSeconds
Data,Typeable,NanoSeconds -> ()
(NanoSeconds -> ()) -> NFData NanoSeconds
forall a. (a -> ()) -> NFData a
rnf :: NanoSeconds -> ()
$crnf :: NanoSeconds -> ()
NFData)
instance Show NanoSeconds where
show :: NanoSeconds -> String
show (NanoSeconds Int64
v) = Int64 -> ShowS
forall a. Show a => a -> ShowS
shows Int64
v String
"ns"
instance TimeInterval NanoSeconds where
toSeconds :: NanoSeconds -> Seconds
toSeconds (NanoSeconds Int64
ns) = Int64 -> Seconds
Seconds (Int64
ns Int64 -> Int64 -> Int64
forall a. Integral a => a -> a -> a
`div` Int64
1000000000)
fromSeconds :: Seconds -> (NanoSeconds, Seconds)
fromSeconds (Seconds Int64
s) = (Int64 -> NanoSeconds
NanoSeconds (Int64
s Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
* Int64
1000000000), Seconds
0)
newtype Seconds = Seconds Int64
deriving (ReadPrec [Seconds]
ReadPrec Seconds
Int -> ReadS Seconds
ReadS [Seconds]
(Int -> ReadS Seconds)
-> ReadS [Seconds]
-> ReadPrec Seconds
-> ReadPrec [Seconds]
-> Read Seconds
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Seconds]
$creadListPrec :: ReadPrec [Seconds]
readPrec :: ReadPrec Seconds
$creadPrec :: ReadPrec Seconds
readList :: ReadS [Seconds]
$creadList :: ReadS [Seconds]
readsPrec :: Int -> ReadS Seconds
$creadsPrec :: Int -> ReadS Seconds
Read,Seconds -> Seconds -> Bool
(Seconds -> Seconds -> Bool)
-> (Seconds -> Seconds -> Bool) -> Eq Seconds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Seconds -> Seconds -> Bool
$c/= :: Seconds -> Seconds -> Bool
== :: Seconds -> Seconds -> Bool
$c== :: Seconds -> Seconds -> Bool
Eq,Eq Seconds
Eq Seconds
-> (Seconds -> Seconds -> Ordering)
-> (Seconds -> Seconds -> Bool)
-> (Seconds -> Seconds -> Bool)
-> (Seconds -> Seconds -> Bool)
-> (Seconds -> Seconds -> Bool)
-> (Seconds -> Seconds -> Seconds)
-> (Seconds -> Seconds -> Seconds)
-> Ord Seconds
Seconds -> Seconds -> Bool
Seconds -> Seconds -> Ordering
Seconds -> Seconds -> Seconds
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Seconds -> Seconds -> Seconds
$cmin :: Seconds -> Seconds -> Seconds
max :: Seconds -> Seconds -> Seconds
$cmax :: Seconds -> Seconds -> Seconds
>= :: Seconds -> Seconds -> Bool
$c>= :: Seconds -> Seconds -> Bool
> :: Seconds -> Seconds -> Bool
$c> :: Seconds -> Seconds -> Bool
<= :: Seconds -> Seconds -> Bool
$c<= :: Seconds -> Seconds -> Bool
< :: Seconds -> Seconds -> Bool
$c< :: Seconds -> Seconds -> Bool
compare :: Seconds -> Seconds -> Ordering
$ccompare :: Seconds -> Seconds -> Ordering
$cp1Ord :: Eq Seconds
Ord,Int -> Seconds
Seconds -> Int
Seconds -> [Seconds]
Seconds -> Seconds
Seconds -> Seconds -> [Seconds]
Seconds -> Seconds -> Seconds -> [Seconds]
(Seconds -> Seconds)
-> (Seconds -> Seconds)
-> (Int -> Seconds)
-> (Seconds -> Int)
-> (Seconds -> [Seconds])
-> (Seconds -> Seconds -> [Seconds])
-> (Seconds -> Seconds -> [Seconds])
-> (Seconds -> Seconds -> Seconds -> [Seconds])
-> Enum Seconds
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Seconds -> Seconds -> Seconds -> [Seconds]
$cenumFromThenTo :: Seconds -> Seconds -> Seconds -> [Seconds]
enumFromTo :: Seconds -> Seconds -> [Seconds]
$cenumFromTo :: Seconds -> Seconds -> [Seconds]
enumFromThen :: Seconds -> Seconds -> [Seconds]
$cenumFromThen :: Seconds -> Seconds -> [Seconds]
enumFrom :: Seconds -> [Seconds]
$cenumFrom :: Seconds -> [Seconds]
fromEnum :: Seconds -> Int
$cfromEnum :: Seconds -> Int
toEnum :: Int -> Seconds
$ctoEnum :: Int -> Seconds
pred :: Seconds -> Seconds
$cpred :: Seconds -> Seconds
succ :: Seconds -> Seconds
$csucc :: Seconds -> Seconds
Enum,Integer -> Seconds
Seconds -> Seconds
Seconds -> Seconds -> Seconds
(Seconds -> Seconds -> Seconds)
-> (Seconds -> Seconds -> Seconds)
-> (Seconds -> Seconds -> Seconds)
-> (Seconds -> Seconds)
-> (Seconds -> Seconds)
-> (Seconds -> Seconds)
-> (Integer -> Seconds)
-> Num Seconds
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> Seconds
$cfromInteger :: Integer -> Seconds
signum :: Seconds -> Seconds
$csignum :: Seconds -> Seconds
abs :: Seconds -> Seconds
$cabs :: Seconds -> Seconds
negate :: Seconds -> Seconds
$cnegate :: Seconds -> Seconds
* :: Seconds -> Seconds -> Seconds
$c* :: Seconds -> Seconds -> Seconds
- :: Seconds -> Seconds -> Seconds
$c- :: Seconds -> Seconds -> Seconds
+ :: Seconds -> Seconds -> Seconds
$c+ :: Seconds -> Seconds -> Seconds
Num,Num Seconds
Ord Seconds
Num Seconds -> Ord Seconds -> (Seconds -> Rational) -> Real Seconds
Seconds -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: Seconds -> Rational
$ctoRational :: Seconds -> Rational
$cp2Real :: Ord Seconds
$cp1Real :: Num Seconds
Real,Enum Seconds
Real Seconds
Real Seconds
-> Enum Seconds
-> (Seconds -> Seconds -> Seconds)
-> (Seconds -> Seconds -> Seconds)
-> (Seconds -> Seconds -> Seconds)
-> (Seconds -> Seconds -> Seconds)
-> (Seconds -> Seconds -> (Seconds, Seconds))
-> (Seconds -> Seconds -> (Seconds, Seconds))
-> (Seconds -> Integer)
-> Integral Seconds
Seconds -> Integer
Seconds -> Seconds -> (Seconds, Seconds)
Seconds -> Seconds -> Seconds
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: Seconds -> Integer
$ctoInteger :: Seconds -> Integer
divMod :: Seconds -> Seconds -> (Seconds, Seconds)
$cdivMod :: Seconds -> Seconds -> (Seconds, Seconds)
quotRem :: Seconds -> Seconds -> (Seconds, Seconds)
$cquotRem :: Seconds -> Seconds -> (Seconds, Seconds)
mod :: Seconds -> Seconds -> Seconds
$cmod :: Seconds -> Seconds -> Seconds
div :: Seconds -> Seconds -> Seconds
$cdiv :: Seconds -> Seconds -> Seconds
rem :: Seconds -> Seconds -> Seconds
$crem :: Seconds -> Seconds -> Seconds
quot :: Seconds -> Seconds -> Seconds
$cquot :: Seconds -> Seconds -> Seconds
$cp2Integral :: Enum Seconds
$cp1Integral :: Real Seconds
Integral,Typeable Seconds
DataType
Constr
Typeable Seconds
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Seconds -> c Seconds)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Seconds)
-> (Seconds -> Constr)
-> (Seconds -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Seconds))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Seconds))
-> ((forall b. Data b => b -> b) -> Seconds -> Seconds)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Seconds -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Seconds -> r)
-> (forall u. (forall d. Data d => d -> u) -> Seconds -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Seconds -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Seconds -> m Seconds)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Seconds -> m Seconds)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Seconds -> m Seconds)
-> Data Seconds
Seconds -> DataType
Seconds -> Constr
(forall b. Data b => b -> b) -> Seconds -> Seconds
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Seconds -> c Seconds
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Seconds
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Seconds -> u
forall u. (forall d. Data d => d -> u) -> Seconds -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Seconds -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Seconds -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Seconds -> m Seconds
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Seconds -> m Seconds
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Seconds
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Seconds -> c Seconds
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Seconds)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Seconds)
$cSeconds :: Constr
$tSeconds :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Seconds -> m Seconds
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Seconds -> m Seconds
gmapMp :: (forall d. Data d => d -> m d) -> Seconds -> m Seconds
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Seconds -> m Seconds
gmapM :: (forall d. Data d => d -> m d) -> Seconds -> m Seconds
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Seconds -> m Seconds
gmapQi :: Int -> (forall d. Data d => d -> u) -> Seconds -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Seconds -> u
gmapQ :: (forall d. Data d => d -> u) -> Seconds -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Seconds -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Seconds -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Seconds -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Seconds -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Seconds -> r
gmapT :: (forall b. Data b => b -> b) -> Seconds -> Seconds
$cgmapT :: (forall b. Data b => b -> b) -> Seconds -> Seconds
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Seconds)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Seconds)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Seconds)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Seconds)
dataTypeOf :: Seconds -> DataType
$cdataTypeOf :: Seconds -> DataType
toConstr :: Seconds -> Constr
$ctoConstr :: Seconds -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Seconds
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Seconds
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Seconds -> c Seconds
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Seconds -> c Seconds
$cp1Data :: Typeable Seconds
Data,Typeable,Seconds -> ()
(Seconds -> ()) -> NFData Seconds
forall a. (a -> ()) -> NFData a
rnf :: Seconds -> ()
$crnf :: Seconds -> ()
NFData)
instance Show Seconds where
show :: Seconds -> String
show (Seconds Int64
s) = Int64 -> ShowS
forall a. Show a => a -> ShowS
shows Int64
s String
"s"
instance TimeInterval Seconds where
toSeconds :: Seconds -> Seconds
toSeconds = Seconds -> Seconds
forall a. a -> a
id
fromSeconds :: Seconds -> (Seconds, Seconds)
fromSeconds Seconds
s = (Seconds
s,Seconds
0)
newtype Minutes = Minutes Int64
deriving (ReadPrec [Minutes]
ReadPrec Minutes
Int -> ReadS Minutes
ReadS [Minutes]
(Int -> ReadS Minutes)
-> ReadS [Minutes]
-> ReadPrec Minutes
-> ReadPrec [Minutes]
-> Read Minutes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Minutes]
$creadListPrec :: ReadPrec [Minutes]
readPrec :: ReadPrec Minutes
$creadPrec :: ReadPrec Minutes
readList :: ReadS [Minutes]
$creadList :: ReadS [Minutes]
readsPrec :: Int -> ReadS Minutes
$creadsPrec :: Int -> ReadS Minutes
Read,Minutes -> Minutes -> Bool
(Minutes -> Minutes -> Bool)
-> (Minutes -> Minutes -> Bool) -> Eq Minutes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Minutes -> Minutes -> Bool
$c/= :: Minutes -> Minutes -> Bool
== :: Minutes -> Minutes -> Bool
$c== :: Minutes -> Minutes -> Bool
Eq,Eq Minutes
Eq Minutes
-> (Minutes -> Minutes -> Ordering)
-> (Minutes -> Minutes -> Bool)
-> (Minutes -> Minutes -> Bool)
-> (Minutes -> Minutes -> Bool)
-> (Minutes -> Minutes -> Bool)
-> (Minutes -> Minutes -> Minutes)
-> (Minutes -> Minutes -> Minutes)
-> Ord Minutes
Minutes -> Minutes -> Bool
Minutes -> Minutes -> Ordering
Minutes -> Minutes -> Minutes
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Minutes -> Minutes -> Minutes
$cmin :: Minutes -> Minutes -> Minutes
max :: Minutes -> Minutes -> Minutes
$cmax :: Minutes -> Minutes -> Minutes
>= :: Minutes -> Minutes -> Bool
$c>= :: Minutes -> Minutes -> Bool
> :: Minutes -> Minutes -> Bool
$c> :: Minutes -> Minutes -> Bool
<= :: Minutes -> Minutes -> Bool
$c<= :: Minutes -> Minutes -> Bool
< :: Minutes -> Minutes -> Bool
$c< :: Minutes -> Minutes -> Bool
compare :: Minutes -> Minutes -> Ordering
$ccompare :: Minutes -> Minutes -> Ordering
$cp1Ord :: Eq Minutes
Ord,Int -> Minutes
Minutes -> Int
Minutes -> [Minutes]
Minutes -> Minutes
Minutes -> Minutes -> [Minutes]
Minutes -> Minutes -> Minutes -> [Minutes]
(Minutes -> Minutes)
-> (Minutes -> Minutes)
-> (Int -> Minutes)
-> (Minutes -> Int)
-> (Minutes -> [Minutes])
-> (Minutes -> Minutes -> [Minutes])
-> (Minutes -> Minutes -> [Minutes])
-> (Minutes -> Minutes -> Minutes -> [Minutes])
-> Enum Minutes
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Minutes -> Minutes -> Minutes -> [Minutes]
$cenumFromThenTo :: Minutes -> Minutes -> Minutes -> [Minutes]
enumFromTo :: Minutes -> Minutes -> [Minutes]
$cenumFromTo :: Minutes -> Minutes -> [Minutes]
enumFromThen :: Minutes -> Minutes -> [Minutes]
$cenumFromThen :: Minutes -> Minutes -> [Minutes]
enumFrom :: Minutes -> [Minutes]
$cenumFrom :: Minutes -> [Minutes]
fromEnum :: Minutes -> Int
$cfromEnum :: Minutes -> Int
toEnum :: Int -> Minutes
$ctoEnum :: Int -> Minutes
pred :: Minutes -> Minutes
$cpred :: Minutes -> Minutes
succ :: Minutes -> Minutes
$csucc :: Minutes -> Minutes
Enum,Integer -> Minutes
Minutes -> Minutes
Minutes -> Minutes -> Minutes
(Minutes -> Minutes -> Minutes)
-> (Minutes -> Minutes -> Minutes)
-> (Minutes -> Minutes -> Minutes)
-> (Minutes -> Minutes)
-> (Minutes -> Minutes)
-> (Minutes -> Minutes)
-> (Integer -> Minutes)
-> Num Minutes
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> Minutes
$cfromInteger :: Integer -> Minutes
signum :: Minutes -> Minutes
$csignum :: Minutes -> Minutes
abs :: Minutes -> Minutes
$cabs :: Minutes -> Minutes
negate :: Minutes -> Minutes
$cnegate :: Minutes -> Minutes
* :: Minutes -> Minutes -> Minutes
$c* :: Minutes -> Minutes -> Minutes
- :: Minutes -> Minutes -> Minutes
$c- :: Minutes -> Minutes -> Minutes
+ :: Minutes -> Minutes -> Minutes
$c+ :: Minutes -> Minutes -> Minutes
Num,Num Minutes
Ord Minutes
Num Minutes -> Ord Minutes -> (Minutes -> Rational) -> Real Minutes
Minutes -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: Minutes -> Rational
$ctoRational :: Minutes -> Rational
$cp2Real :: Ord Minutes
$cp1Real :: Num Minutes
Real,Enum Minutes
Real Minutes
Real Minutes
-> Enum Minutes
-> (Minutes -> Minutes -> Minutes)
-> (Minutes -> Minutes -> Minutes)
-> (Minutes -> Minutes -> Minutes)
-> (Minutes -> Minutes -> Minutes)
-> (Minutes -> Minutes -> (Minutes, Minutes))
-> (Minutes -> Minutes -> (Minutes, Minutes))
-> (Minutes -> Integer)
-> Integral Minutes
Minutes -> Integer
Minutes -> Minutes -> (Minutes, Minutes)
Minutes -> Minutes -> Minutes
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: Minutes -> Integer
$ctoInteger :: Minutes -> Integer
divMod :: Minutes -> Minutes -> (Minutes, Minutes)
$cdivMod :: Minutes -> Minutes -> (Minutes, Minutes)
quotRem :: Minutes -> Minutes -> (Minutes, Minutes)
$cquotRem :: Minutes -> Minutes -> (Minutes, Minutes)
mod :: Minutes -> Minutes -> Minutes
$cmod :: Minutes -> Minutes -> Minutes
div :: Minutes -> Minutes -> Minutes
$cdiv :: Minutes -> Minutes -> Minutes
rem :: Minutes -> Minutes -> Minutes
$crem :: Minutes -> Minutes -> Minutes
quot :: Minutes -> Minutes -> Minutes
$cquot :: Minutes -> Minutes -> Minutes
$cp2Integral :: Enum Minutes
$cp1Integral :: Real Minutes
Integral,Typeable Minutes
DataType
Constr
Typeable Minutes
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Minutes -> c Minutes)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Minutes)
-> (Minutes -> Constr)
-> (Minutes -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Minutes))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Minutes))
-> ((forall b. Data b => b -> b) -> Minutes -> Minutes)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Minutes -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Minutes -> r)
-> (forall u. (forall d. Data d => d -> u) -> Minutes -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Minutes -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Minutes -> m Minutes)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minutes -> m Minutes)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minutes -> m Minutes)
-> Data Minutes
Minutes -> DataType
Minutes -> Constr
(forall b. Data b => b -> b) -> Minutes -> Minutes
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Minutes -> c Minutes
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Minutes
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Minutes -> u
forall u. (forall d. Data d => d -> u) -> Minutes -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Minutes -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Minutes -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Minutes -> m Minutes
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minutes -> m Minutes
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Minutes
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Minutes -> c Minutes
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Minutes)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Minutes)
$cMinutes :: Constr
$tMinutes :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Minutes -> m Minutes
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minutes -> m Minutes
gmapMp :: (forall d. Data d => d -> m d) -> Minutes -> m Minutes
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Minutes -> m Minutes
gmapM :: (forall d. Data d => d -> m d) -> Minutes -> m Minutes
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Minutes -> m Minutes
gmapQi :: Int -> (forall d. Data d => d -> u) -> Minutes -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Minutes -> u
gmapQ :: (forall d. Data d => d -> u) -> Minutes -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Minutes -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Minutes -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Minutes -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Minutes -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Minutes -> r
gmapT :: (forall b. Data b => b -> b) -> Minutes -> Minutes
$cgmapT :: (forall b. Data b => b -> b) -> Minutes -> Minutes
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Minutes)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Minutes)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Minutes)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Minutes)
dataTypeOf :: Minutes -> DataType
$cdataTypeOf :: Minutes -> DataType
toConstr :: Minutes -> Constr
$ctoConstr :: Minutes -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Minutes
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Minutes
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Minutes -> c Minutes
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Minutes -> c Minutes
$cp1Data :: Typeable Minutes
Data,Typeable,Minutes -> ()
(Minutes -> ()) -> NFData Minutes
forall a. (a -> ()) -> NFData a
rnf :: Minutes -> ()
$crnf :: Minutes -> ()
NFData)
instance Show Minutes where
show :: Minutes -> String
show (Minutes Int64
s) = Int64 -> ShowS
forall a. Show a => a -> ShowS
shows Int64
s String
"m"
instance TimeInterval Minutes where
toSeconds :: Minutes -> Seconds
toSeconds (Minutes Int64
m) = Int64 -> Seconds
Seconds (Int64
m Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
* Int64
60)
fromSeconds :: Seconds -> (Minutes, Seconds)
fromSeconds (Seconds Int64
s) = (Int64 -> Minutes
Minutes Int64
m, Int64 -> Seconds
Seconds Int64
s')
where (Int64
m, Int64
s') = Int64
s Int64 -> Int64 -> (Int64, Int64)
forall a. Integral a => a -> a -> (a, a)
`divMod` Int64
60
newtype Hours = Hours Int64
deriving (ReadPrec [Hours]
ReadPrec Hours
Int -> ReadS Hours
ReadS [Hours]
(Int -> ReadS Hours)
-> ReadS [Hours]
-> ReadPrec Hours
-> ReadPrec [Hours]
-> Read Hours
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Hours]
$creadListPrec :: ReadPrec [Hours]
readPrec :: ReadPrec Hours
$creadPrec :: ReadPrec Hours
readList :: ReadS [Hours]
$creadList :: ReadS [Hours]
readsPrec :: Int -> ReadS Hours
$creadsPrec :: Int -> ReadS Hours
Read,Hours -> Hours -> Bool
(Hours -> Hours -> Bool) -> (Hours -> Hours -> Bool) -> Eq Hours
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Hours -> Hours -> Bool
$c/= :: Hours -> Hours -> Bool
== :: Hours -> Hours -> Bool
$c== :: Hours -> Hours -> Bool
Eq,Eq Hours
Eq Hours
-> (Hours -> Hours -> Ordering)
-> (Hours -> Hours -> Bool)
-> (Hours -> Hours -> Bool)
-> (Hours -> Hours -> Bool)
-> (Hours -> Hours -> Bool)
-> (Hours -> Hours -> Hours)
-> (Hours -> Hours -> Hours)
-> Ord Hours
Hours -> Hours -> Bool
Hours -> Hours -> Ordering
Hours -> Hours -> Hours
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Hours -> Hours -> Hours
$cmin :: Hours -> Hours -> Hours
max :: Hours -> Hours -> Hours
$cmax :: Hours -> Hours -> Hours
>= :: Hours -> Hours -> Bool
$c>= :: Hours -> Hours -> Bool
> :: Hours -> Hours -> Bool
$c> :: Hours -> Hours -> Bool
<= :: Hours -> Hours -> Bool
$c<= :: Hours -> Hours -> Bool
< :: Hours -> Hours -> Bool
$c< :: Hours -> Hours -> Bool
compare :: Hours -> Hours -> Ordering
$ccompare :: Hours -> Hours -> Ordering
$cp1Ord :: Eq Hours
Ord,Int -> Hours
Hours -> Int
Hours -> [Hours]
Hours -> Hours
Hours -> Hours -> [Hours]
Hours -> Hours -> Hours -> [Hours]
(Hours -> Hours)
-> (Hours -> Hours)
-> (Int -> Hours)
-> (Hours -> Int)
-> (Hours -> [Hours])
-> (Hours -> Hours -> [Hours])
-> (Hours -> Hours -> [Hours])
-> (Hours -> Hours -> Hours -> [Hours])
-> Enum Hours
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Hours -> Hours -> Hours -> [Hours]
$cenumFromThenTo :: Hours -> Hours -> Hours -> [Hours]
enumFromTo :: Hours -> Hours -> [Hours]
$cenumFromTo :: Hours -> Hours -> [Hours]
enumFromThen :: Hours -> Hours -> [Hours]
$cenumFromThen :: Hours -> Hours -> [Hours]
enumFrom :: Hours -> [Hours]
$cenumFrom :: Hours -> [Hours]
fromEnum :: Hours -> Int
$cfromEnum :: Hours -> Int
toEnum :: Int -> Hours
$ctoEnum :: Int -> Hours
pred :: Hours -> Hours
$cpred :: Hours -> Hours
succ :: Hours -> Hours
$csucc :: Hours -> Hours
Enum,Integer -> Hours
Hours -> Hours
Hours -> Hours -> Hours
(Hours -> Hours -> Hours)
-> (Hours -> Hours -> Hours)
-> (Hours -> Hours -> Hours)
-> (Hours -> Hours)
-> (Hours -> Hours)
-> (Hours -> Hours)
-> (Integer -> Hours)
-> Num Hours
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> Hours
$cfromInteger :: Integer -> Hours
signum :: Hours -> Hours
$csignum :: Hours -> Hours
abs :: Hours -> Hours
$cabs :: Hours -> Hours
negate :: Hours -> Hours
$cnegate :: Hours -> Hours
* :: Hours -> Hours -> Hours
$c* :: Hours -> Hours -> Hours
- :: Hours -> Hours -> Hours
$c- :: Hours -> Hours -> Hours
+ :: Hours -> Hours -> Hours
$c+ :: Hours -> Hours -> Hours
Num,Num Hours
Ord Hours
Num Hours -> Ord Hours -> (Hours -> Rational) -> Real Hours
Hours -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: Hours -> Rational
$ctoRational :: Hours -> Rational
$cp2Real :: Ord Hours
$cp1Real :: Num Hours
Real,Enum Hours
Real Hours
Real Hours
-> Enum Hours
-> (Hours -> Hours -> Hours)
-> (Hours -> Hours -> Hours)
-> (Hours -> Hours -> Hours)
-> (Hours -> Hours -> Hours)
-> (Hours -> Hours -> (Hours, Hours))
-> (Hours -> Hours -> (Hours, Hours))
-> (Hours -> Integer)
-> Integral Hours
Hours -> Integer
Hours -> Hours -> (Hours, Hours)
Hours -> Hours -> Hours
forall a.
Real a
-> Enum a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> (a, a))
-> (a -> a -> (a, a))
-> (a -> Integer)
-> Integral a
toInteger :: Hours -> Integer
$ctoInteger :: Hours -> Integer
divMod :: Hours -> Hours -> (Hours, Hours)
$cdivMod :: Hours -> Hours -> (Hours, Hours)
quotRem :: Hours -> Hours -> (Hours, Hours)
$cquotRem :: Hours -> Hours -> (Hours, Hours)
mod :: Hours -> Hours -> Hours
$cmod :: Hours -> Hours -> Hours
div :: Hours -> Hours -> Hours
$cdiv :: Hours -> Hours -> Hours
rem :: Hours -> Hours -> Hours
$crem :: Hours -> Hours -> Hours
quot :: Hours -> Hours -> Hours
$cquot :: Hours -> Hours -> Hours
$cp2Integral :: Enum Hours
$cp1Integral :: Real Hours
Integral,Typeable Hours
DataType
Constr
Typeable Hours
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Hours -> c Hours)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Hours)
-> (Hours -> Constr)
-> (Hours -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Hours))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Hours))
-> ((forall b. Data b => b -> b) -> Hours -> Hours)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Hours -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Hours -> r)
-> (forall u. (forall d. Data d => d -> u) -> Hours -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Hours -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Hours -> m Hours)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hours -> m Hours)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hours -> m Hours)
-> Data Hours
Hours -> DataType
Hours -> Constr
(forall b. Data b => b -> b) -> Hours -> Hours
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Hours -> c Hours
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Hours
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Hours -> u
forall u. (forall d. Data d => d -> u) -> Hours -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Hours -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Hours -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Hours -> m Hours
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hours -> m Hours
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Hours
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Hours -> c Hours
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Hours)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Hours)
$cHours :: Constr
$tHours :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Hours -> m Hours
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hours -> m Hours
gmapMp :: (forall d. Data d => d -> m d) -> Hours -> m Hours
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Hours -> m Hours
gmapM :: (forall d. Data d => d -> m d) -> Hours -> m Hours
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Hours -> m Hours
gmapQi :: Int -> (forall d. Data d => d -> u) -> Hours -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Hours -> u
gmapQ :: (forall d. Data d => d -> u) -> Hours -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Hours -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Hours -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Hours -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Hours -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Hours -> r
gmapT :: (forall b. Data b => b -> b) -> Hours -> Hours
$cgmapT :: (forall b. Data b => b -> b) -> Hours -> Hours
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Hours)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Hours)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Hours)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Hours)
dataTypeOf :: Hours -> DataType
$cdataTypeOf :: Hours -> DataType
toConstr :: Hours -> Constr
$ctoConstr :: Hours -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Hours
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Hours
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Hours -> c Hours
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Hours -> c Hours
$cp1Data :: Typeable Hours
Data,Typeable,Hours -> ()
(Hours -> ()) -> NFData Hours
forall a. (a -> ()) -> NFData a
rnf :: Hours -> ()
$crnf :: Hours -> ()
NFData)
instance Show Hours where
show :: Hours -> String
show (Hours Int64
s) = Int64 -> ShowS
forall a. Show a => a -> ShowS
shows Int64
s String
"h"
instance TimeInterval Hours where
toSeconds :: Hours -> Seconds
toSeconds (Hours Int64
h) = Int64 -> Seconds
Seconds (Int64
h Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
* Int64
3600)
fromSeconds :: Seconds -> (Hours, Seconds)
fromSeconds (Seconds Int64
s) = (Int64 -> Hours
Hours Int64
h, Int64 -> Seconds
Seconds Int64
s')
where (Int64
h, Int64
s') = Int64
s Int64 -> Int64 -> (Int64, Int64)
forall a. Integral a => a -> a -> (a, a)
`divMod` Int64
3600
newtype Elapsed = Elapsed Seconds
deriving (ReadPrec [Elapsed]
ReadPrec Elapsed
Int -> ReadS Elapsed
ReadS [Elapsed]
(Int -> ReadS Elapsed)
-> ReadS [Elapsed]
-> ReadPrec Elapsed
-> ReadPrec [Elapsed]
-> Read Elapsed
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Elapsed]
$creadListPrec :: ReadPrec [Elapsed]
readPrec :: ReadPrec Elapsed
$creadPrec :: ReadPrec Elapsed
readList :: ReadS [Elapsed]
$creadList :: ReadS [Elapsed]
readsPrec :: Int -> ReadS Elapsed
$creadsPrec :: Int -> ReadS Elapsed
Read,Elapsed -> Elapsed -> Bool
(Elapsed -> Elapsed -> Bool)
-> (Elapsed -> Elapsed -> Bool) -> Eq Elapsed
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Elapsed -> Elapsed -> Bool
$c/= :: Elapsed -> Elapsed -> Bool
== :: Elapsed -> Elapsed -> Bool
$c== :: Elapsed -> Elapsed -> Bool
Eq,Eq Elapsed
Eq Elapsed
-> (Elapsed -> Elapsed -> Ordering)
-> (Elapsed -> Elapsed -> Bool)
-> (Elapsed -> Elapsed -> Bool)
-> (Elapsed -> Elapsed -> Bool)
-> (Elapsed -> Elapsed -> Bool)
-> (Elapsed -> Elapsed -> Elapsed)
-> (Elapsed -> Elapsed -> Elapsed)
-> Ord Elapsed
Elapsed -> Elapsed -> Bool
Elapsed -> Elapsed -> Ordering
Elapsed -> Elapsed -> Elapsed
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Elapsed -> Elapsed -> Elapsed
$cmin :: Elapsed -> Elapsed -> Elapsed
max :: Elapsed -> Elapsed -> Elapsed
$cmax :: Elapsed -> Elapsed -> Elapsed
>= :: Elapsed -> Elapsed -> Bool
$c>= :: Elapsed -> Elapsed -> Bool
> :: Elapsed -> Elapsed -> Bool
$c> :: Elapsed -> Elapsed -> Bool
<= :: Elapsed -> Elapsed -> Bool
$c<= :: Elapsed -> Elapsed -> Bool
< :: Elapsed -> Elapsed -> Bool
$c< :: Elapsed -> Elapsed -> Bool
compare :: Elapsed -> Elapsed -> Ordering
$ccompare :: Elapsed -> Elapsed -> Ordering
$cp1Ord :: Eq Elapsed
Ord,Integer -> Elapsed
Elapsed -> Elapsed
Elapsed -> Elapsed -> Elapsed
(Elapsed -> Elapsed -> Elapsed)
-> (Elapsed -> Elapsed -> Elapsed)
-> (Elapsed -> Elapsed -> Elapsed)
-> (Elapsed -> Elapsed)
-> (Elapsed -> Elapsed)
-> (Elapsed -> Elapsed)
-> (Integer -> Elapsed)
-> Num Elapsed
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> Elapsed
$cfromInteger :: Integer -> Elapsed
signum :: Elapsed -> Elapsed
$csignum :: Elapsed -> Elapsed
abs :: Elapsed -> Elapsed
$cabs :: Elapsed -> Elapsed
negate :: Elapsed -> Elapsed
$cnegate :: Elapsed -> Elapsed
* :: Elapsed -> Elapsed -> Elapsed
$c* :: Elapsed -> Elapsed -> Elapsed
- :: Elapsed -> Elapsed -> Elapsed
$c- :: Elapsed -> Elapsed -> Elapsed
+ :: Elapsed -> Elapsed -> Elapsed
$c+ :: Elapsed -> Elapsed -> Elapsed
Num,Typeable Elapsed
DataType
Constr
Typeable Elapsed
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elapsed -> c Elapsed)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Elapsed)
-> (Elapsed -> Constr)
-> (Elapsed -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Elapsed))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Elapsed))
-> ((forall b. Data b => b -> b) -> Elapsed -> Elapsed)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elapsed -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elapsed -> r)
-> (forall u. (forall d. Data d => d -> u) -> Elapsed -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Elapsed -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Elapsed -> m Elapsed)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Elapsed -> m Elapsed)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Elapsed -> m Elapsed)
-> Data Elapsed
Elapsed -> DataType
Elapsed -> Constr
(forall b. Data b => b -> b) -> Elapsed -> Elapsed
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elapsed -> c Elapsed
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Elapsed
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Elapsed -> u
forall u. (forall d. Data d => d -> u) -> Elapsed -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elapsed -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elapsed -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Elapsed -> m Elapsed
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Elapsed -> m Elapsed
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Elapsed
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elapsed -> c Elapsed
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Elapsed)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Elapsed)
$cElapsed :: Constr
$tElapsed :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Elapsed -> m Elapsed
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Elapsed -> m Elapsed
gmapMp :: (forall d. Data d => d -> m d) -> Elapsed -> m Elapsed
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Elapsed -> m Elapsed
gmapM :: (forall d. Data d => d -> m d) -> Elapsed -> m Elapsed
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Elapsed -> m Elapsed
gmapQi :: Int -> (forall d. Data d => d -> u) -> Elapsed -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Elapsed -> u
gmapQ :: (forall d. Data d => d -> u) -> Elapsed -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Elapsed -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elapsed -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elapsed -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elapsed -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elapsed -> r
gmapT :: (forall b. Data b => b -> b) -> Elapsed -> Elapsed
$cgmapT :: (forall b. Data b => b -> b) -> Elapsed -> Elapsed
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Elapsed)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Elapsed)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Elapsed)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Elapsed)
dataTypeOf :: Elapsed -> DataType
$cdataTypeOf :: Elapsed -> DataType
toConstr :: Elapsed -> Constr
$ctoConstr :: Elapsed -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Elapsed
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Elapsed
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elapsed -> c Elapsed
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elapsed -> c Elapsed
$cp1Data :: Typeable Elapsed
Data,Typeable,Elapsed -> ()
(Elapsed -> ()) -> NFData Elapsed
forall a. (a -> ()) -> NFData a
rnf :: Elapsed -> ()
$crnf :: Elapsed -> ()
NFData)
instance Show Elapsed where
show :: Elapsed -> String
show (Elapsed Seconds
s) = Seconds -> String
forall a. Show a => a -> String
show Seconds
s
data ElapsedP = ElapsedP {-# UNPACK #-} !Elapsed {-# UNPACK #-} !NanoSeconds
deriving (ReadPrec [ElapsedP]
ReadPrec ElapsedP
Int -> ReadS ElapsedP
ReadS [ElapsedP]
(Int -> ReadS ElapsedP)
-> ReadS [ElapsedP]
-> ReadPrec ElapsedP
-> ReadPrec [ElapsedP]
-> Read ElapsedP
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ElapsedP]
$creadListPrec :: ReadPrec [ElapsedP]
readPrec :: ReadPrec ElapsedP
$creadPrec :: ReadPrec ElapsedP
readList :: ReadS [ElapsedP]
$creadList :: ReadS [ElapsedP]
readsPrec :: Int -> ReadS ElapsedP
$creadsPrec :: Int -> ReadS ElapsedP
Read,ElapsedP -> ElapsedP -> Bool
(ElapsedP -> ElapsedP -> Bool)
-> (ElapsedP -> ElapsedP -> Bool) -> Eq ElapsedP
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ElapsedP -> ElapsedP -> Bool
$c/= :: ElapsedP -> ElapsedP -> Bool
== :: ElapsedP -> ElapsedP -> Bool
$c== :: ElapsedP -> ElapsedP -> Bool
Eq,Eq ElapsedP
Eq ElapsedP
-> (ElapsedP -> ElapsedP -> Ordering)
-> (ElapsedP -> ElapsedP -> Bool)
-> (ElapsedP -> ElapsedP -> Bool)
-> (ElapsedP -> ElapsedP -> Bool)
-> (ElapsedP -> ElapsedP -> Bool)
-> (ElapsedP -> ElapsedP -> ElapsedP)
-> (ElapsedP -> ElapsedP -> ElapsedP)
-> Ord ElapsedP
ElapsedP -> ElapsedP -> Bool
ElapsedP -> ElapsedP -> Ordering
ElapsedP -> ElapsedP -> ElapsedP
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ElapsedP -> ElapsedP -> ElapsedP
$cmin :: ElapsedP -> ElapsedP -> ElapsedP
max :: ElapsedP -> ElapsedP -> ElapsedP
$cmax :: ElapsedP -> ElapsedP -> ElapsedP
>= :: ElapsedP -> ElapsedP -> Bool
$c>= :: ElapsedP -> ElapsedP -> Bool
> :: ElapsedP -> ElapsedP -> Bool
$c> :: ElapsedP -> ElapsedP -> Bool
<= :: ElapsedP -> ElapsedP -> Bool
$c<= :: ElapsedP -> ElapsedP -> Bool
< :: ElapsedP -> ElapsedP -> Bool
$c< :: ElapsedP -> ElapsedP -> Bool
compare :: ElapsedP -> ElapsedP -> Ordering
$ccompare :: ElapsedP -> ElapsedP -> Ordering
$cp1Ord :: Eq ElapsedP
Ord,Typeable ElapsedP
DataType
Constr
Typeable ElapsedP
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ElapsedP -> c ElapsedP)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ElapsedP)
-> (ElapsedP -> Constr)
-> (ElapsedP -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ElapsedP))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ElapsedP))
-> ((forall b. Data b => b -> b) -> ElapsedP -> ElapsedP)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ElapsedP -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ElapsedP -> r)
-> (forall u. (forall d. Data d => d -> u) -> ElapsedP -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> ElapsedP -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP)
-> Data ElapsedP
ElapsedP -> DataType
ElapsedP -> Constr
(forall b. Data b => b -> b) -> ElapsedP -> ElapsedP
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ElapsedP -> c ElapsedP
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ElapsedP
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ElapsedP -> u
forall u. (forall d. Data d => d -> u) -> ElapsedP -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ElapsedP -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ElapsedP -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ElapsedP
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ElapsedP -> c ElapsedP
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ElapsedP)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ElapsedP)
$cElapsedP :: Constr
$tElapsedP :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP
gmapMp :: (forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP
gmapM :: (forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ElapsedP -> m ElapsedP
gmapQi :: Int -> (forall d. Data d => d -> u) -> ElapsedP -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ElapsedP -> u
gmapQ :: (forall d. Data d => d -> u) -> ElapsedP -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ElapsedP -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ElapsedP -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ElapsedP -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ElapsedP -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ElapsedP -> r
gmapT :: (forall b. Data b => b -> b) -> ElapsedP -> ElapsedP
$cgmapT :: (forall b. Data b => b -> b) -> ElapsedP -> ElapsedP
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ElapsedP)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ElapsedP)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ElapsedP)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ElapsedP)
dataTypeOf :: ElapsedP -> DataType
$cdataTypeOf :: ElapsedP -> DataType
toConstr :: ElapsedP -> Constr
$ctoConstr :: ElapsedP -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ElapsedP
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ElapsedP
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ElapsedP -> c ElapsedP
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ElapsedP -> c ElapsedP
$cp1Data :: Typeable ElapsedP
Data,Typeable)
instance Show ElapsedP where
show :: ElapsedP -> String
show (ElapsedP Elapsed
e NanoSeconds
ns) = Elapsed -> ShowS
forall a. Show a => a -> ShowS
shows Elapsed
e (Char
'.' Char -> ShowS
forall a. a -> [a] -> [a]
: NanoSeconds -> String
forall a. Show a => a -> String
show NanoSeconds
ns)
instance NFData ElapsedP where rnf :: ElapsedP -> ()
rnf ElapsedP
e = ElapsedP
e ElapsedP -> () -> ()
`seq` ()
instance Num ElapsedP where
+ :: ElapsedP -> ElapsedP -> ElapsedP
(+) = ElapsedP -> ElapsedP -> ElapsedP
addElapsedP
(-) = ElapsedP -> ElapsedP -> ElapsedP
subElapsedP
(ElapsedP Elapsed
e1 NanoSeconds
ns1) * :: ElapsedP -> ElapsedP -> ElapsedP
* (ElapsedP Elapsed
e2 NanoSeconds
ns2) = Elapsed -> NanoSeconds -> ElapsedP
ElapsedP (Elapsed
e1Elapsed -> Elapsed -> Elapsed
forall a. Num a => a -> a -> a
*Elapsed
e2) (NanoSeconds
ns1NanoSeconds -> NanoSeconds -> NanoSeconds
forall a. Num a => a -> a -> a
*NanoSeconds
ns2)
negate :: ElapsedP -> ElapsedP
negate (ElapsedP Elapsed
e NanoSeconds
ns) = Elapsed -> NanoSeconds -> ElapsedP
ElapsedP (Elapsed -> Elapsed
forall a. Num a => a -> a
negate Elapsed
e) NanoSeconds
ns
abs :: ElapsedP -> ElapsedP
abs (ElapsedP Elapsed
e NanoSeconds
ns) = Elapsed -> NanoSeconds -> ElapsedP
ElapsedP (Elapsed -> Elapsed
forall a. Num a => a -> a
abs Elapsed
e) NanoSeconds
ns
signum :: ElapsedP -> ElapsedP
signum (ElapsedP Elapsed
e NanoSeconds
ns) = Elapsed -> NanoSeconds -> ElapsedP
ElapsedP (Elapsed -> Elapsed
forall a. Num a => a -> a
signum Elapsed
e) NanoSeconds
ns
fromInteger :: Integer -> ElapsedP
fromInteger Integer
i = Elapsed -> NanoSeconds -> ElapsedP
ElapsedP (Seconds -> Elapsed
Elapsed (Integer -> Seconds
forall a b. (Integral a, Num b) => a -> b
fromIntegral Integer
i)) NanoSeconds
0
addElapsedP :: ElapsedP -> ElapsedP -> ElapsedP
addElapsedP :: ElapsedP -> ElapsedP -> ElapsedP
addElapsedP (ElapsedP Elapsed
e1 (NanoSeconds Int64
ns1)) (ElapsedP Elapsed
e2 (NanoSeconds Int64
ns2)) =
let notNormalizedNS :: Int64
notNormalizedNS = Int64
ns1 Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
+ Int64
ns2
(Int64
retainedNS, Int64
ns) = Int64
notNormalizedNS Int64 -> Int64 -> (Int64, Int64)
forall a. Integral a => a -> a -> (a, a)
`divMod` Int64
1000000000
in Elapsed -> NanoSeconds -> ElapsedP
ElapsedP (Elapsed
e1 Elapsed -> Elapsed -> Elapsed
forall a. Num a => a -> a -> a
+ Elapsed
e2 Elapsed -> Elapsed -> Elapsed
forall a. Num a => a -> a -> a
+ (Seconds -> Elapsed
Elapsed (Seconds -> Elapsed) -> Seconds -> Elapsed
forall a b. (a -> b) -> a -> b
$ Int64 -> Seconds
Seconds Int64
retainedNS)) (Int64 -> NanoSeconds
NanoSeconds Int64
ns)
subElapsedP :: ElapsedP -> ElapsedP -> ElapsedP
subElapsedP :: ElapsedP -> ElapsedP -> ElapsedP
subElapsedP (ElapsedP Elapsed
e1 (NanoSeconds Int64
ns1)) (ElapsedP Elapsed
e2 (NanoSeconds Int64
ns2)) =
let notNormalizedNS :: Int64
notNormalizedNS = Int64
ns1 Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
- Int64
ns2
notNormalizedS :: Elapsed
notNormalizedS = Elapsed
e1 Elapsed -> Elapsed -> Elapsed
forall a. Num a => a -> a -> a
- Elapsed
e2
in if Int64
notNormalizedNS Int64 -> Int64 -> Bool
forall a. Ord a => a -> a -> Bool
< Int64
0
then Elapsed -> NanoSeconds -> ElapsedP
ElapsedP (Elapsed
notNormalizedS Elapsed -> Elapsed -> Elapsed
forall a. Num a => a -> a -> a
- Elapsed
oneSecond) (Int64 -> NanoSeconds
NanoSeconds (Int64
1000000000 Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
+ Int64
notNormalizedNS))
else Elapsed -> NanoSeconds -> ElapsedP
ElapsedP Elapsed
notNormalizedS (Int64 -> NanoSeconds
NanoSeconds Int64
notNormalizedNS)
where
oneSecond :: Elapsed
oneSecond :: Elapsed
oneSecond = Seconds -> Elapsed
Elapsed (Seconds -> Elapsed) -> Seconds -> Elapsed
forall a b. (a -> b) -> a -> b
$ Int64 -> Seconds
Seconds Int64
1
instance Real ElapsedP where
toRational :: ElapsedP -> Rational
toRational (ElapsedP (Elapsed (Seconds Int64
s)) (NanoSeconds Int64
0)) =
Int64 -> Rational
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int64
s
toRational (ElapsedP (Elapsed (Seconds Int64
s)) (NanoSeconds Int64
ns)) =
Int64 -> Rational
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int64
s Rational -> Rational -> Rational
forall a. Num a => a -> a -> a
+ (Int64 -> Integer
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int64
ns Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
% Integer
1000000000)
data Month =
January
| February
| March
| April
| May
| June
| July
| August
| September
| October
| November
| December
deriving (Int -> Month -> ShowS
[Month] -> ShowS
Month -> String
(Int -> Month -> ShowS)
-> (Month -> String) -> ([Month] -> ShowS) -> Show Month
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Month] -> ShowS
$cshowList :: [Month] -> ShowS
show :: Month -> String
$cshow :: Month -> String
showsPrec :: Int -> Month -> ShowS
$cshowsPrec :: Int -> Month -> ShowS
Show,ReadPrec [Month]
ReadPrec Month
Int -> ReadS Month
ReadS [Month]
(Int -> ReadS Month)
-> ReadS [Month]
-> ReadPrec Month
-> ReadPrec [Month]
-> Read Month
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Month]
$creadListPrec :: ReadPrec [Month]
readPrec :: ReadPrec Month
$creadPrec :: ReadPrec Month
readList :: ReadS [Month]
$creadList :: ReadS [Month]
readsPrec :: Int -> ReadS Month
$creadsPrec :: Int -> ReadS Month
Read,Month -> Month -> Bool
(Month -> Month -> Bool) -> (Month -> Month -> Bool) -> Eq Month
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Month -> Month -> Bool
$c/= :: Month -> Month -> Bool
== :: Month -> Month -> Bool
$c== :: Month -> Month -> Bool
Eq,Eq Month
Eq Month
-> (Month -> Month -> Ordering)
-> (Month -> Month -> Bool)
-> (Month -> Month -> Bool)
-> (Month -> Month -> Bool)
-> (Month -> Month -> Bool)
-> (Month -> Month -> Month)
-> (Month -> Month -> Month)
-> Ord Month
Month -> Month -> Bool
Month -> Month -> Ordering
Month -> Month -> Month
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Month -> Month -> Month
$cmin :: Month -> Month -> Month
max :: Month -> Month -> Month
$cmax :: Month -> Month -> Month
>= :: Month -> Month -> Bool
$c>= :: Month -> Month -> Bool
> :: Month -> Month -> Bool
$c> :: Month -> Month -> Bool
<= :: Month -> Month -> Bool
$c<= :: Month -> Month -> Bool
< :: Month -> Month -> Bool
$c< :: Month -> Month -> Bool
compare :: Month -> Month -> Ordering
$ccompare :: Month -> Month -> Ordering
$cp1Ord :: Eq Month
Ord,Int -> Month
Month -> Int
Month -> [Month]
Month -> Month
Month -> Month -> [Month]
Month -> Month -> Month -> [Month]
(Month -> Month)
-> (Month -> Month)
-> (Int -> Month)
-> (Month -> Int)
-> (Month -> [Month])
-> (Month -> Month -> [Month])
-> (Month -> Month -> [Month])
-> (Month -> Month -> Month -> [Month])
-> Enum Month
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Month -> Month -> Month -> [Month]
$cenumFromThenTo :: Month -> Month -> Month -> [Month]
enumFromTo :: Month -> Month -> [Month]
$cenumFromTo :: Month -> Month -> [Month]
enumFromThen :: Month -> Month -> [Month]
$cenumFromThen :: Month -> Month -> [Month]
enumFrom :: Month -> [Month]
$cenumFrom :: Month -> [Month]
fromEnum :: Month -> Int
$cfromEnum :: Month -> Int
toEnum :: Int -> Month
$ctoEnum :: Int -> Month
pred :: Month -> Month
$cpred :: Month -> Month
succ :: Month -> Month
$csucc :: Month -> Month
Enum,Typeable Month
DataType
Constr
Typeable Month
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Month -> c Month)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Month)
-> (Month -> Constr)
-> (Month -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Month))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Month))
-> ((forall b. Data b => b -> b) -> Month -> Month)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r)
-> (forall u. (forall d. Data d => d -> u) -> Month -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Month -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Month -> m Month)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Month -> m Month)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Month -> m Month)
-> Data Month
Month -> DataType
Month -> Constr
(forall b. Data b => b -> b) -> Month -> Month
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Month -> c Month
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Month
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Month -> u
forall u. (forall d. Data d => d -> u) -> Month -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Month -> m Month
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Month -> m Month
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Month
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Month -> c Month
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Month)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Month)
$cDecember :: Constr
$cNovember :: Constr
$cOctober :: Constr
$cSeptember :: Constr
$cAugust :: Constr
$cJuly :: Constr
$cJune :: Constr
$cMay :: Constr
$cApril :: Constr
$cMarch :: Constr
$cFebruary :: Constr
$cJanuary :: Constr
$tMonth :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Month -> m Month
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Month -> m Month
gmapMp :: (forall d. Data d => d -> m d) -> Month -> m Month
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Month -> m Month
gmapM :: (forall d. Data d => d -> m d) -> Month -> m Month
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Month -> m Month
gmapQi :: Int -> (forall d. Data d => d -> u) -> Month -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Month -> u
gmapQ :: (forall d. Data d => d -> u) -> Month -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Month -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Month -> r
gmapT :: (forall b. Data b => b -> b) -> Month -> Month
$cgmapT :: (forall b. Data b => b -> b) -> Month -> Month
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Month)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Month)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Month)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Month)
dataTypeOf :: Month -> DataType
$cdataTypeOf :: Month -> DataType
toConstr :: Month -> Constr
$ctoConstr :: Month -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Month
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Month
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Month -> c Month
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Month -> c Month
$cp1Data :: Typeable Month
Data,Typeable,Month
Month -> Month -> Bounded Month
forall a. a -> a -> Bounded a
maxBound :: Month
$cmaxBound :: Month
minBound :: Month
$cminBound :: Month
Bounded)
data WeekDay =
Sunday
| Monday
| Tuesday
| Wednesday
| Thursday
| Friday
| Saturday
deriving (Int -> WeekDay -> ShowS
[WeekDay] -> ShowS
WeekDay -> String
(Int -> WeekDay -> ShowS)
-> (WeekDay -> String) -> ([WeekDay] -> ShowS) -> Show WeekDay
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WeekDay] -> ShowS
$cshowList :: [WeekDay] -> ShowS
show :: WeekDay -> String
$cshow :: WeekDay -> String
showsPrec :: Int -> WeekDay -> ShowS
$cshowsPrec :: Int -> WeekDay -> ShowS
Show,ReadPrec [WeekDay]
ReadPrec WeekDay
Int -> ReadS WeekDay
ReadS [WeekDay]
(Int -> ReadS WeekDay)
-> ReadS [WeekDay]
-> ReadPrec WeekDay
-> ReadPrec [WeekDay]
-> Read WeekDay
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WeekDay]
$creadListPrec :: ReadPrec [WeekDay]
readPrec :: ReadPrec WeekDay
$creadPrec :: ReadPrec WeekDay
readList :: ReadS [WeekDay]
$creadList :: ReadS [WeekDay]
readsPrec :: Int -> ReadS WeekDay
$creadsPrec :: Int -> ReadS WeekDay
Read,WeekDay -> WeekDay -> Bool
(WeekDay -> WeekDay -> Bool)
-> (WeekDay -> WeekDay -> Bool) -> Eq WeekDay
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WeekDay -> WeekDay -> Bool
$c/= :: WeekDay -> WeekDay -> Bool
== :: WeekDay -> WeekDay -> Bool
$c== :: WeekDay -> WeekDay -> Bool
Eq,Eq WeekDay
Eq WeekDay
-> (WeekDay -> WeekDay -> Ordering)
-> (WeekDay -> WeekDay -> Bool)
-> (WeekDay -> WeekDay -> Bool)
-> (WeekDay -> WeekDay -> Bool)
-> (WeekDay -> WeekDay -> Bool)
-> (WeekDay -> WeekDay -> WeekDay)
-> (WeekDay -> WeekDay -> WeekDay)
-> Ord WeekDay
WeekDay -> WeekDay -> Bool
WeekDay -> WeekDay -> Ordering
WeekDay -> WeekDay -> WeekDay
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: WeekDay -> WeekDay -> WeekDay
$cmin :: WeekDay -> WeekDay -> WeekDay
max :: WeekDay -> WeekDay -> WeekDay
$cmax :: WeekDay -> WeekDay -> WeekDay
>= :: WeekDay -> WeekDay -> Bool
$c>= :: WeekDay -> WeekDay -> Bool
> :: WeekDay -> WeekDay -> Bool
$c> :: WeekDay -> WeekDay -> Bool
<= :: WeekDay -> WeekDay -> Bool
$c<= :: WeekDay -> WeekDay -> Bool
< :: WeekDay -> WeekDay -> Bool
$c< :: WeekDay -> WeekDay -> Bool
compare :: WeekDay -> WeekDay -> Ordering
$ccompare :: WeekDay -> WeekDay -> Ordering
$cp1Ord :: Eq WeekDay
Ord,Int -> WeekDay
WeekDay -> Int
WeekDay -> [WeekDay]
WeekDay -> WeekDay
WeekDay -> WeekDay -> [WeekDay]
WeekDay -> WeekDay -> WeekDay -> [WeekDay]
(WeekDay -> WeekDay)
-> (WeekDay -> WeekDay)
-> (Int -> WeekDay)
-> (WeekDay -> Int)
-> (WeekDay -> [WeekDay])
-> (WeekDay -> WeekDay -> [WeekDay])
-> (WeekDay -> WeekDay -> [WeekDay])
-> (WeekDay -> WeekDay -> WeekDay -> [WeekDay])
-> Enum WeekDay
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: WeekDay -> WeekDay -> WeekDay -> [WeekDay]
$cenumFromThenTo :: WeekDay -> WeekDay -> WeekDay -> [WeekDay]
enumFromTo :: WeekDay -> WeekDay -> [WeekDay]
$cenumFromTo :: WeekDay -> WeekDay -> [WeekDay]
enumFromThen :: WeekDay -> WeekDay -> [WeekDay]
$cenumFromThen :: WeekDay -> WeekDay -> [WeekDay]
enumFrom :: WeekDay -> [WeekDay]
$cenumFrom :: WeekDay -> [WeekDay]
fromEnum :: WeekDay -> Int
$cfromEnum :: WeekDay -> Int
toEnum :: Int -> WeekDay
$ctoEnum :: Int -> WeekDay
pred :: WeekDay -> WeekDay
$cpred :: WeekDay -> WeekDay
succ :: WeekDay -> WeekDay
$csucc :: WeekDay -> WeekDay
Enum,Typeable WeekDay
DataType
Constr
Typeable WeekDay
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WeekDay -> c WeekDay)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WeekDay)
-> (WeekDay -> Constr)
-> (WeekDay -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WeekDay))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WeekDay))
-> ((forall b. Data b => b -> b) -> WeekDay -> WeekDay)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WeekDay -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WeekDay -> r)
-> (forall u. (forall d. Data d => d -> u) -> WeekDay -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> WeekDay -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WeekDay -> m WeekDay)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WeekDay -> m WeekDay)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WeekDay -> m WeekDay)
-> Data WeekDay
WeekDay -> DataType
WeekDay -> Constr
(forall b. Data b => b -> b) -> WeekDay -> WeekDay
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WeekDay -> c WeekDay
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WeekDay
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> WeekDay -> u
forall u. (forall d. Data d => d -> u) -> WeekDay -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WeekDay -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WeekDay -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WeekDay -> m WeekDay
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WeekDay -> m WeekDay
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WeekDay
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WeekDay -> c WeekDay
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WeekDay)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WeekDay)
$cSaturday :: Constr
$cFriday :: Constr
$cThursday :: Constr
$cWednesday :: Constr
$cTuesday :: Constr
$cMonday :: Constr
$cSunday :: Constr
$tWeekDay :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> WeekDay -> m WeekDay
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WeekDay -> m WeekDay
gmapMp :: (forall d. Data d => d -> m d) -> WeekDay -> m WeekDay
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> WeekDay -> m WeekDay
gmapM :: (forall d. Data d => d -> m d) -> WeekDay -> m WeekDay
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> WeekDay -> m WeekDay
gmapQi :: Int -> (forall d. Data d => d -> u) -> WeekDay -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> WeekDay -> u
gmapQ :: (forall d. Data d => d -> u) -> WeekDay -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> WeekDay -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WeekDay -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WeekDay -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WeekDay -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WeekDay -> r
gmapT :: (forall b. Data b => b -> b) -> WeekDay -> WeekDay
$cgmapT :: (forall b. Data b => b -> b) -> WeekDay -> WeekDay
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WeekDay)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WeekDay)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c WeekDay)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WeekDay)
dataTypeOf :: WeekDay -> DataType
$cdataTypeOf :: WeekDay -> DataType
toConstr :: WeekDay -> Constr
$ctoConstr :: WeekDay -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WeekDay
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WeekDay
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WeekDay -> c WeekDay
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WeekDay -> c WeekDay
$cp1Data :: Typeable WeekDay
Data,Typeable,WeekDay
WeekDay -> WeekDay -> Bounded WeekDay
forall a. a -> a -> Bounded a
maxBound :: WeekDay
$cmaxBound :: WeekDay
minBound :: WeekDay
$cminBound :: WeekDay
Bounded)
newtype TimezoneOffset = TimezoneOffset
{ TimezoneOffset -> Int
timezoneOffsetToMinutes :: Int
} deriving (TimezoneOffset -> TimezoneOffset -> Bool
(TimezoneOffset -> TimezoneOffset -> Bool)
-> (TimezoneOffset -> TimezoneOffset -> Bool) -> Eq TimezoneOffset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimezoneOffset -> TimezoneOffset -> Bool
$c/= :: TimezoneOffset -> TimezoneOffset -> Bool
== :: TimezoneOffset -> TimezoneOffset -> Bool
$c== :: TimezoneOffset -> TimezoneOffset -> Bool
Eq,Eq TimezoneOffset
Eq TimezoneOffset
-> (TimezoneOffset -> TimezoneOffset -> Ordering)
-> (TimezoneOffset -> TimezoneOffset -> Bool)
-> (TimezoneOffset -> TimezoneOffset -> Bool)
-> (TimezoneOffset -> TimezoneOffset -> Bool)
-> (TimezoneOffset -> TimezoneOffset -> Bool)
-> (TimezoneOffset -> TimezoneOffset -> TimezoneOffset)
-> (TimezoneOffset -> TimezoneOffset -> TimezoneOffset)
-> Ord TimezoneOffset
TimezoneOffset -> TimezoneOffset -> Bool
TimezoneOffset -> TimezoneOffset -> Ordering
TimezoneOffset -> TimezoneOffset -> TimezoneOffset
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: TimezoneOffset -> TimezoneOffset -> TimezoneOffset
$cmin :: TimezoneOffset -> TimezoneOffset -> TimezoneOffset
max :: TimezoneOffset -> TimezoneOffset -> TimezoneOffset
$cmax :: TimezoneOffset -> TimezoneOffset -> TimezoneOffset
>= :: TimezoneOffset -> TimezoneOffset -> Bool
$c>= :: TimezoneOffset -> TimezoneOffset -> Bool
> :: TimezoneOffset -> TimezoneOffset -> Bool
$c> :: TimezoneOffset -> TimezoneOffset -> Bool
<= :: TimezoneOffset -> TimezoneOffset -> Bool
$c<= :: TimezoneOffset -> TimezoneOffset -> Bool
< :: TimezoneOffset -> TimezoneOffset -> Bool
$c< :: TimezoneOffset -> TimezoneOffset -> Bool
compare :: TimezoneOffset -> TimezoneOffset -> Ordering
$ccompare :: TimezoneOffset -> TimezoneOffset -> Ordering
$cp1Ord :: Eq TimezoneOffset
Ord,Typeable TimezoneOffset
DataType
Constr
Typeable TimezoneOffset
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimezoneOffset -> c TimezoneOffset)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimezoneOffset)
-> (TimezoneOffset -> Constr)
-> (TimezoneOffset -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TimezoneOffset))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TimezoneOffset))
-> ((forall b. Data b => b -> b)
-> TimezoneOffset -> TimezoneOffset)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TimezoneOffset -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TimezoneOffset -> r)
-> (forall u.
(forall d. Data d => d -> u) -> TimezoneOffset -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TimezoneOffset -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset)
-> Data TimezoneOffset
TimezoneOffset -> DataType
TimezoneOffset -> Constr
(forall b. Data b => b -> b) -> TimezoneOffset -> TimezoneOffset
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimezoneOffset -> c TimezoneOffset
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimezoneOffset
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> TimezoneOffset -> u
forall u. (forall d. Data d => d -> u) -> TimezoneOffset -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TimezoneOffset -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TimezoneOffset -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimezoneOffset
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimezoneOffset -> c TimezoneOffset
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TimezoneOffset)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TimezoneOffset)
$cTimezoneOffset :: Constr
$tTimezoneOffset :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset
gmapMp :: (forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset
gmapM :: (forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> TimezoneOffset -> m TimezoneOffset
gmapQi :: Int -> (forall d. Data d => d -> u) -> TimezoneOffset -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> TimezoneOffset -> u
gmapQ :: (forall d. Data d => d -> u) -> TimezoneOffset -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TimezoneOffset -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TimezoneOffset -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TimezoneOffset -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TimezoneOffset -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TimezoneOffset -> r
gmapT :: (forall b. Data b => b -> b) -> TimezoneOffset -> TimezoneOffset
$cgmapT :: (forall b. Data b => b -> b) -> TimezoneOffset -> TimezoneOffset
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TimezoneOffset)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TimezoneOffset)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TimezoneOffset)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TimezoneOffset)
dataTypeOf :: TimezoneOffset -> DataType
$cdataTypeOf :: TimezoneOffset -> DataType
toConstr :: TimezoneOffset -> Constr
$ctoConstr :: TimezoneOffset -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimezoneOffset
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimezoneOffset
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimezoneOffset -> c TimezoneOffset
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimezoneOffset -> c TimezoneOffset
$cp1Data :: Typeable TimezoneOffset
Data,Typeable,TimezoneOffset -> ()
(TimezoneOffset -> ()) -> NFData TimezoneOffset
forall a. (a -> ()) -> NFData a
rnf :: TimezoneOffset -> ()
$crnf :: TimezoneOffset -> ()
NFData)
timezoneOffsetToSeconds :: TimezoneOffset -> Seconds
timezoneOffsetToSeconds :: TimezoneOffset -> Seconds
timezoneOffsetToSeconds (TimezoneOffset Int
ofs) = Int64 -> Seconds
Seconds (Int -> Int64
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ofs Int64 -> Int64 -> Int64
forall a. Num a => a -> a -> a
* Int64
60)
instance Show TimezoneOffset where
show :: TimezoneOffset -> String
show (TimezoneOffset Int
tz) =
[String] -> String
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat [if Int
tz Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< Int
0 then String
"-" else String
"+", Int -> String
forall a. (Show a, Ord a, Num a, Integral a) => a -> String
pad2 Int
tzH, Int -> String
forall a. (Show a, Ord a, Num a, Integral a) => a -> String
pad2 Int
tzM]
where (Int
tzH, Int
tzM) = Int -> Int
forall a. Num a => a -> a
abs Int
tz Int -> Int -> (Int, Int)
forall a. Integral a => a -> a -> (a, a)
`divMod` Int
60
timezone_UTC :: TimezoneOffset
timezone_UTC :: TimezoneOffset
timezone_UTC = Int -> TimezoneOffset
TimezoneOffset Int
0
data Date = Date
{ Date -> Int
dateYear :: {-# UNPACK #-} !Int
, Date -> Month
dateMonth :: !Month
, Date -> Int
dateDay :: {-# UNPACK #-} !Int
} deriving (Int -> Date -> ShowS
[Date] -> ShowS
Date -> String
(Int -> Date -> ShowS)
-> (Date -> String) -> ([Date] -> ShowS) -> Show Date
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Date] -> ShowS
$cshowList :: [Date] -> ShowS
show :: Date -> String
$cshow :: Date -> String
showsPrec :: Int -> Date -> ShowS
$cshowsPrec :: Int -> Date -> ShowS
Show,ReadPrec [Date]
ReadPrec Date
Int -> ReadS Date
ReadS [Date]
(Int -> ReadS Date)
-> ReadS [Date] -> ReadPrec Date -> ReadPrec [Date] -> Read Date
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Date]
$creadListPrec :: ReadPrec [Date]
readPrec :: ReadPrec Date
$creadPrec :: ReadPrec Date
readList :: ReadS [Date]
$creadList :: ReadS [Date]
readsPrec :: Int -> ReadS Date
$creadsPrec :: Int -> ReadS Date
Read,Date -> Date -> Bool
(Date -> Date -> Bool) -> (Date -> Date -> Bool) -> Eq Date
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Date -> Date -> Bool
$c/= :: Date -> Date -> Bool
== :: Date -> Date -> Bool
$c== :: Date -> Date -> Bool
Eq,Eq Date
Eq Date
-> (Date -> Date -> Ordering)
-> (Date -> Date -> Bool)
-> (Date -> Date -> Bool)
-> (Date -> Date -> Bool)
-> (Date -> Date -> Bool)
-> (Date -> Date -> Date)
-> (Date -> Date -> Date)
-> Ord Date
Date -> Date -> Bool
Date -> Date -> Ordering
Date -> Date -> Date
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Date -> Date -> Date
$cmin :: Date -> Date -> Date
max :: Date -> Date -> Date
$cmax :: Date -> Date -> Date
>= :: Date -> Date -> Bool
$c>= :: Date -> Date -> Bool
> :: Date -> Date -> Bool
$c> :: Date -> Date -> Bool
<= :: Date -> Date -> Bool
$c<= :: Date -> Date -> Bool
< :: Date -> Date -> Bool
$c< :: Date -> Date -> Bool
compare :: Date -> Date -> Ordering
$ccompare :: Date -> Date -> Ordering
$cp1Ord :: Eq Date
Ord,Typeable Date
DataType
Constr
Typeable Date
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date)
-> (Date -> Constr)
-> (Date -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Date))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date))
-> ((forall b. Data b => b -> b) -> Date -> Date)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r)
-> (forall u. (forall d. Data d => d -> u) -> Date -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Date -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Date -> m Date)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Date -> m Date)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Date -> m Date)
-> Data Date
Date -> DataType
Date -> Constr
(forall b. Data b => b -> b) -> Date -> Date
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Date -> u
forall u. (forall d. Data d => d -> u) -> Date -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Date -> m Date
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Date -> m Date
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Date)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date)
$cDate :: Constr
$tDate :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Date -> m Date
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Date -> m Date
gmapMp :: (forall d. Data d => d -> m d) -> Date -> m Date
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Date -> m Date
gmapM :: (forall d. Data d => d -> m d) -> Date -> m Date
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Date -> m Date
gmapQi :: Int -> (forall d. Data d => d -> u) -> Date -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Date -> u
gmapQ :: (forall d. Data d => d -> u) -> Date -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Date -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
gmapT :: (forall b. Data b => b -> b) -> Date -> Date
$cgmapT :: (forall b. Data b => b -> b) -> Date -> Date
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Date)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Date)
dataTypeOf :: Date -> DataType
$cdataTypeOf :: Date -> DataType
toConstr :: Date -> Constr
$ctoConstr :: Date -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date
$cp1Data :: Typeable Date
Data,Typeable)
instance NFData Date where
rnf :: Date -> ()
rnf (Date Int
y Month
m Int
d) = Int
y Int -> () -> ()
`seq` Month
m Month -> () -> ()
`seq` Int
d Int -> () -> ()
`seq` ()
data TimeOfDay = TimeOfDay
{ TimeOfDay -> Hours
todHour :: {-# UNPACK #-} !Hours
, TimeOfDay -> Minutes
todMin :: {-# UNPACK #-} !Minutes
, TimeOfDay -> Seconds
todSec :: {-# UNPACK #-} !Seconds
, TimeOfDay -> NanoSeconds
todNSec :: {-# UNPACK #-} !NanoSeconds
} deriving (Int -> TimeOfDay -> ShowS
[TimeOfDay] -> ShowS
TimeOfDay -> String
(Int -> TimeOfDay -> ShowS)
-> (TimeOfDay -> String)
-> ([TimeOfDay] -> ShowS)
-> Show TimeOfDay
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimeOfDay] -> ShowS
$cshowList :: [TimeOfDay] -> ShowS
show :: TimeOfDay -> String
$cshow :: TimeOfDay -> String
showsPrec :: Int -> TimeOfDay -> ShowS
$cshowsPrec :: Int -> TimeOfDay -> ShowS
Show,ReadPrec [TimeOfDay]
ReadPrec TimeOfDay
Int -> ReadS TimeOfDay
ReadS [TimeOfDay]
(Int -> ReadS TimeOfDay)
-> ReadS [TimeOfDay]
-> ReadPrec TimeOfDay
-> ReadPrec [TimeOfDay]
-> Read TimeOfDay
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimeOfDay]
$creadListPrec :: ReadPrec [TimeOfDay]
readPrec :: ReadPrec TimeOfDay
$creadPrec :: ReadPrec TimeOfDay
readList :: ReadS [TimeOfDay]
$creadList :: ReadS [TimeOfDay]
readsPrec :: Int -> ReadS TimeOfDay
$creadsPrec :: Int -> ReadS TimeOfDay
Read,TimeOfDay -> TimeOfDay -> Bool
(TimeOfDay -> TimeOfDay -> Bool)
-> (TimeOfDay -> TimeOfDay -> Bool) -> Eq TimeOfDay
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimeOfDay -> TimeOfDay -> Bool
$c/= :: TimeOfDay -> TimeOfDay -> Bool
== :: TimeOfDay -> TimeOfDay -> Bool
$c== :: TimeOfDay -> TimeOfDay -> Bool
Eq,Eq TimeOfDay
Eq TimeOfDay
-> (TimeOfDay -> TimeOfDay -> Ordering)
-> (TimeOfDay -> TimeOfDay -> Bool)
-> (TimeOfDay -> TimeOfDay -> Bool)
-> (TimeOfDay -> TimeOfDay -> Bool)
-> (TimeOfDay -> TimeOfDay -> Bool)
-> (TimeOfDay -> TimeOfDay -> TimeOfDay)
-> (TimeOfDay -> TimeOfDay -> TimeOfDay)
-> Ord TimeOfDay
TimeOfDay -> TimeOfDay -> Bool
TimeOfDay -> TimeOfDay -> Ordering
TimeOfDay -> TimeOfDay -> TimeOfDay
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: TimeOfDay -> TimeOfDay -> TimeOfDay
$cmin :: TimeOfDay -> TimeOfDay -> TimeOfDay
max :: TimeOfDay -> TimeOfDay -> TimeOfDay
$cmax :: TimeOfDay -> TimeOfDay -> TimeOfDay
>= :: TimeOfDay -> TimeOfDay -> Bool
$c>= :: TimeOfDay -> TimeOfDay -> Bool
> :: TimeOfDay -> TimeOfDay -> Bool
$c> :: TimeOfDay -> TimeOfDay -> Bool
<= :: TimeOfDay -> TimeOfDay -> Bool
$c<= :: TimeOfDay -> TimeOfDay -> Bool
< :: TimeOfDay -> TimeOfDay -> Bool
$c< :: TimeOfDay -> TimeOfDay -> Bool
compare :: TimeOfDay -> TimeOfDay -> Ordering
$ccompare :: TimeOfDay -> TimeOfDay -> Ordering
$cp1Ord :: Eq TimeOfDay
Ord,Typeable TimeOfDay
DataType
Constr
Typeable TimeOfDay
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimeOfDay -> c TimeOfDay)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimeOfDay)
-> (TimeOfDay -> Constr)
-> (TimeOfDay -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TimeOfDay))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeOfDay))
-> ((forall b. Data b => b -> b) -> TimeOfDay -> TimeOfDay)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r)
-> (forall u. (forall d. Data d => d -> u) -> TimeOfDay -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TimeOfDay -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay)
-> Data TimeOfDay
TimeOfDay -> DataType
TimeOfDay -> Constr
(forall b. Data b => b -> b) -> TimeOfDay -> TimeOfDay
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimeOfDay -> c TimeOfDay
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimeOfDay
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TimeOfDay -> u
forall u. (forall d. Data d => d -> u) -> TimeOfDay -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimeOfDay
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimeOfDay -> c TimeOfDay
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TimeOfDay)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeOfDay)
$cTimeOfDay :: Constr
$tTimeOfDay :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay
gmapMp :: (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay
gmapM :: (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay
gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeOfDay -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TimeOfDay -> u
gmapQ :: (forall d. Data d => d -> u) -> TimeOfDay -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TimeOfDay -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r
gmapT :: (forall b. Data b => b -> b) -> TimeOfDay -> TimeOfDay
$cgmapT :: (forall b. Data b => b -> b) -> TimeOfDay -> TimeOfDay
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeOfDay)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeOfDay)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TimeOfDay)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TimeOfDay)
dataTypeOf :: TimeOfDay -> DataType
$cdataTypeOf :: TimeOfDay -> DataType
toConstr :: TimeOfDay -> Constr
$ctoConstr :: TimeOfDay -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimeOfDay
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TimeOfDay
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimeOfDay -> c TimeOfDay
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TimeOfDay -> c TimeOfDay
$cp1Data :: Typeable TimeOfDay
Data,Typeable)
instance NFData TimeOfDay where
rnf :: TimeOfDay -> ()
rnf (TimeOfDay Hours
h Minutes
m Seconds
s NanoSeconds
ns) = Hours
h Hours -> () -> ()
`seq` Minutes
m Minutes -> () -> ()
`seq` Seconds
s Seconds -> () -> ()
`seq` NanoSeconds
ns NanoSeconds -> () -> ()
`seq` ()
data DateTime = DateTime
{ DateTime -> Date
dtDate :: Date
, DateTime -> TimeOfDay
dtTime :: TimeOfDay
} deriving (Int -> DateTime -> ShowS
[DateTime] -> ShowS
DateTime -> String
(Int -> DateTime -> ShowS)
-> (DateTime -> String) -> ([DateTime] -> ShowS) -> Show DateTime
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DateTime] -> ShowS
$cshowList :: [DateTime] -> ShowS
show :: DateTime -> String
$cshow :: DateTime -> String
showsPrec :: Int -> DateTime -> ShowS
$cshowsPrec :: Int -> DateTime -> ShowS
Show,ReadPrec [DateTime]
ReadPrec DateTime
Int -> ReadS DateTime
ReadS [DateTime]
(Int -> ReadS DateTime)
-> ReadS [DateTime]
-> ReadPrec DateTime
-> ReadPrec [DateTime]
-> Read DateTime
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DateTime]
$creadListPrec :: ReadPrec [DateTime]
readPrec :: ReadPrec DateTime
$creadPrec :: ReadPrec DateTime
readList :: ReadS [DateTime]
$creadList :: ReadS [DateTime]
readsPrec :: Int -> ReadS DateTime
$creadsPrec :: Int -> ReadS DateTime
Read,DateTime -> DateTime -> Bool
(DateTime -> DateTime -> Bool)
-> (DateTime -> DateTime -> Bool) -> Eq DateTime
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DateTime -> DateTime -> Bool
$c/= :: DateTime -> DateTime -> Bool
== :: DateTime -> DateTime -> Bool
$c== :: DateTime -> DateTime -> Bool
Eq,Eq DateTime
Eq DateTime
-> (DateTime -> DateTime -> Ordering)
-> (DateTime -> DateTime -> Bool)
-> (DateTime -> DateTime -> Bool)
-> (DateTime -> DateTime -> Bool)
-> (DateTime -> DateTime -> Bool)
-> (DateTime -> DateTime -> DateTime)
-> (DateTime -> DateTime -> DateTime)
-> Ord DateTime
DateTime -> DateTime -> Bool
DateTime -> DateTime -> Ordering
DateTime -> DateTime -> DateTime
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DateTime -> DateTime -> DateTime
$cmin :: DateTime -> DateTime -> DateTime
max :: DateTime -> DateTime -> DateTime
$cmax :: DateTime -> DateTime -> DateTime
>= :: DateTime -> DateTime -> Bool
$c>= :: DateTime -> DateTime -> Bool
> :: DateTime -> DateTime -> Bool
$c> :: DateTime -> DateTime -> Bool
<= :: DateTime -> DateTime -> Bool
$c<= :: DateTime -> DateTime -> Bool
< :: DateTime -> DateTime -> Bool
$c< :: DateTime -> DateTime -> Bool
compare :: DateTime -> DateTime -> Ordering
$ccompare :: DateTime -> DateTime -> Ordering
$cp1Ord :: Eq DateTime
Ord,Typeable DateTime
DataType
Constr
Typeable DateTime
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DateTime -> c DateTime)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DateTime)
-> (DateTime -> Constr)
-> (DateTime -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DateTime))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateTime))
-> ((forall b. Data b => b -> b) -> DateTime -> DateTime)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DateTime -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DateTime -> r)
-> (forall u. (forall d. Data d => d -> u) -> DateTime -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> DateTime -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DateTime -> m DateTime)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DateTime -> m DateTime)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DateTime -> m DateTime)
-> Data DateTime
DateTime -> DataType
DateTime -> Constr
(forall b. Data b => b -> b) -> DateTime -> DateTime
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DateTime -> c DateTime
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DateTime
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> DateTime -> u
forall u. (forall d. Data d => d -> u) -> DateTime -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DateTime -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DateTime -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DateTime -> m DateTime
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DateTime -> m DateTime
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DateTime
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DateTime -> c DateTime
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DateTime)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateTime)
$cDateTime :: Constr
$tDateTime :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> DateTime -> m DateTime
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DateTime -> m DateTime
gmapMp :: (forall d. Data d => d -> m d) -> DateTime -> m DateTime
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DateTime -> m DateTime
gmapM :: (forall d. Data d => d -> m d) -> DateTime -> m DateTime
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DateTime -> m DateTime
gmapQi :: Int -> (forall d. Data d => d -> u) -> DateTime -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DateTime -> u
gmapQ :: (forall d. Data d => d -> u) -> DateTime -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DateTime -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DateTime -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DateTime -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DateTime -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DateTime -> r
gmapT :: (forall b. Data b => b -> b) -> DateTime -> DateTime
$cgmapT :: (forall b. Data b => b -> b) -> DateTime -> DateTime
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateTime)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DateTime)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DateTime)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DateTime)
dataTypeOf :: DateTime -> DataType
$cdataTypeOf :: DateTime -> DataType
toConstr :: DateTime -> Constr
$ctoConstr :: DateTime -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DateTime
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DateTime
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DateTime -> c DateTime
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DateTime -> c DateTime
$cp1Data :: Typeable DateTime
Data,Typeable)
instance NFData DateTime where
rnf :: DateTime -> ()
rnf (DateTime Date
d TimeOfDay
t) = Date -> ()
forall a. NFData a => a -> ()
rnf Date
d () -> () -> ()
`seq` TimeOfDay -> ()
forall a. NFData a => a -> ()
rnf TimeOfDay
t () -> () -> ()
`seq` ()