1
{-# OPTIONS -Wall -Werror #-}
5
import Data.Time.Calendar
10
fromGregorian 2005 2 28,
11
fromGregorian 2004 2 29,
12
fromGregorian 2004 1 31,
13
fromGregorian 2004 12 31,
14
fromGregorian 2005 7 1,
15
fromGregorian 2005 4 21,
16
fromGregorian 2005 6 30
19
increments :: [Integer]
20
increments = [-10,-4,-1,0,1,7,83]
22
adders :: [(String,Integer -> Day -> Day)]
26
("month (clip)",addGregorianMonthsClip),
27
("month (roll over)",addGregorianMonthsRollOver),
28
("year (clip)",addGregorianYearsClip),
29
("year (roll over)",addGregorianYearsRollOver)
32
resultDays :: [String]
34
(aname,adder) <- adders
35
increment <- increments
37
return ((showGregorian day) ++ " + " ++ (show increment) ++ " * " ++ aname ++ " = " ++ showGregorian (adder increment day))
41
mapM_ putStrLn resultDays