{-# LANGUAGE Safe #-}
module Data.Time.Calendar.Types where
type Year = Integer
pattern CommonEra :: Integer -> Year
pattern $bCommonEra :: Year -> Year
$mCommonEra :: forall r. Year -> (Year -> r) -> (Void# -> r) -> r
CommonEra n <-
((\y -> if y > 0 then Just y else Nothing) -> Just n)
where
CommonEra Year
n = Year
n
pattern BeforeCommonEra :: Integer -> Year
pattern $bBeforeCommonEra :: Year -> Year
$mBeforeCommonEra :: forall r. Year -> (Year -> r) -> (Void# -> r) -> r
BeforeCommonEra n <-
((\y -> if y <= 0 then Just (1 - y) else Nothing) -> Just n)
where
BeforeCommonEra Year
n = Year
1 Year -> Year -> Year
forall a. Num a => a -> a -> a
- Year
n
{-# COMPLETE CommonEra, BeforeCommonEra #-}
type MonthOfYear = Int
pattern January :: MonthOfYear
pattern $bJanuary :: MonthOfYear
$mJanuary :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
January = 1
pattern February :: MonthOfYear
pattern $bFebruary :: MonthOfYear
$mFebruary :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
February = 2
pattern March :: MonthOfYear
pattern $bMarch :: MonthOfYear
$mMarch :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
March = 3
pattern April :: MonthOfYear
pattern $bApril :: MonthOfYear
$mApril :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
April = 4
pattern May :: MonthOfYear
pattern $bMay :: MonthOfYear
$mMay :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
May = 5
pattern June :: MonthOfYear
pattern $bJune :: MonthOfYear
$mJune :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
June = 6
pattern July :: MonthOfYear
pattern $bJuly :: MonthOfYear
$mJuly :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
July = 7
pattern August :: MonthOfYear
pattern $bAugust :: MonthOfYear
$mAugust :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
August = 8
pattern September :: MonthOfYear
pattern $bSeptember :: MonthOfYear
$mSeptember :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
September = 9
pattern October :: MonthOfYear
pattern $bOctober :: MonthOfYear
$mOctober :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
October = 10
pattern November :: MonthOfYear
pattern $bNovember :: MonthOfYear
$mNovember :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
November = 11
pattern December :: MonthOfYear
pattern $bDecember :: MonthOfYear
$mDecember :: forall r. MonthOfYear -> (Void# -> r) -> (Void# -> r) -> r
December = 12
{-# COMPLETE January, February, March, April, May, June, July, August, September, October, November, December #-}
type DayOfMonth = Int
type DayOfQuarter = Int
type DayOfYear = Int
type WeekOfYear = Int