@@ -59,7 +59,7 @@ type Days = Int
5959-- <https://en.wikipedia.org/wiki/Julian_day#Variants Modified Julian Day>
6060-- (MJD) epoch.
6161--
62- -- To convert a 'Day' to the corresponding 'YearMonthDay' in the W_GREGORIAN
62+ -- To convert a 'Day' to the corresponding 'YearMonthDay' in the <https://en.wikipedia.org/wiki/Gregorian_calendar Gregorian>
6363-- calendar, see 'gregorian'.
6464--
6565-- @
@@ -84,7 +84,7 @@ type Days = Int
8484-- Other ways of viewing a 'Day' include 'ordinalDate', and 'weekDate'.
8585newtype Day = ModifiedJulianDay
8686 { toModifiedJulianDay :: Int
87- } deriving (INSTANCES_NEWTYPE , CoArbitrary )
87+ } deriving (Eq , Ord , Data , Typeable , Generic , Enum , Ix , Hashable , NFData , CoArbitrary )
8888
8989instance AffineSpace Day where
9090 type Diff Day = Days
@@ -110,7 +110,7 @@ instance AffineSpace Day where
110110modifiedJulianDay :: Iso' Day Int
111111modifiedJulianDay = iso toModifiedJulianDay ModifiedJulianDay
112112
113- -- | Conversion between a W_GREGORIAN 'OrdinalDate' and the corresponding
113+ -- | Conversion between a <https://en.wikipedia.org/wiki/Gregorian_calendar Gregorian> 'OrdinalDate' and the corresponding
114114-- 'YearMonthDay'.
115115--
116116-- @
@@ -204,7 +204,7 @@ data YearMonthDay = YearMonthDay
204204 { ymdYear :: {-# UNPACK #-}! Year
205205 , ymdMonth :: {-# UNPACK #-}! Month
206206 , ymdDay :: {-# UNPACK #-}! DayOfMonth
207- } deriving (INSTANCES_USUAL , Show )
207+ } deriving (Eq , Ord , Data , Typeable , Generic , Show )
208208
209209LENS (YearMonthDay ,ymdYear,Year )
210210LENS (YearMonthDay ,ymdMonth,Month )
@@ -215,7 +215,7 @@ instance NFData YearMonthDay
215215
216216------------------------------------------------------------------------
217217
218- -- | Is it a leap year according to the W_GREGORIAN calendar?
218+ -- | Is it a leap year according to the <https://en.wikipedia.org/wiki/Gregorian_calendar Gregorian> calendar?
219219isLeapYear :: Year -> Bool
220220isLeapYear y = y .&. 3 == 0 && (r100 /= 0 || q100 .&. 3 == 0 ) where
221221 (q100, r100) = y `quotRem` 100
@@ -228,7 +228,7 @@ type DayOfYear = Int
228228data OrdinalDate = OrdinalDate
229229 { odYear :: {-# UNPACK #-}! Year
230230 , odDay :: {-# UNPACK #-}! DayOfYear
231- } deriving (INSTANCES_USUAL , Show )
231+ } deriving (Eq , Ord , Data , Typeable , Generic , Show )
232232
233233LENS (OrdinalDate ,odYear,Year )
234234LENS (OrdinalDate ,odDay,DayOfYear )
@@ -368,7 +368,7 @@ randomIsoR l (x, y) = first (^. l) . randomR (l # x, l # y)
368368data MonthDay = MonthDay
369369 { mdMonth :: {-# UNPACK #-}! Month
370370 , mdDay :: {-# UNPACK #-}! DayOfMonth
371- } deriving (INSTANCES_USUAL , Show )
371+ } deriving (Eq , Ord , Data , Typeable , Generic , Show )
372372
373373LENS (MonthDay ,mdMonth,Month )
374374LENS (MonthDay ,mdDay,DayOfMonth )
@@ -512,7 +512,7 @@ data WeekDate = WeekDate
512512 -- belong to the previous year.
513513 , wdDay :: {-# UNPACK #-}! DayOfWeek
514514 -- ^ /1 = Monday/ … /7 = Sunday/.
515- } deriving (INSTANCES_USUAL , Show )
515+ } deriving (Eq , Ord , Data , Typeable , Generic , Show )
516516
517517LENS (WeekDate ,wdYear,Year )
518518LENS (WeekDate ,wdWeek,WeekOfYear )
@@ -602,7 +602,7 @@ data SundayWeek = SundayWeek
602602 -- /Sunday/ of the year as the first day of week /01/.
603603 , swDay :: {-# UNPACK #-}! DayOfWeek
604604 -- ^ /0 = Sunday/.
605- } deriving (INSTANCES_USUAL , Show )
605+ } deriving (Eq , Ord , Data , Typeable , Generic , Show )
606606
607607LENS (SundayWeek ,swYear,Year )
608608LENS (SundayWeek ,swWeek,WeekOfYear )
@@ -668,7 +668,7 @@ data MondayWeek = MondayWeek
668668 -- /Monday/ of the year as the first day of week /01/.
669669 , mwDay :: {-# UNPACK #-}! DayOfWeek
670670 -- ^ /7 = Sunday/.
671- } deriving (INSTANCES_USUAL , Show )
671+ } deriving (Eq , Ord , Data , Typeable , Generic , Show )
672672
673673LENS (MondayWeek ,mwYear,Year )
674674LENS (MondayWeek ,mwWeek,WeekOfYear )
0 commit comments