[project @ 2001-01-14 15:46:53 by simonmar]
[ghc-hetmet.git] / ghc / tests / lib / should_run / time002.hs
1 import Time
2
3 -- !!! check that we can read the current ClockTime, convert it
4 -- !!! to CalendarTime and back again, and that all three times when
5 -- !!! converted to strings compare equal.
6
7 main = do
8   t <- getClockTime
9   let clock = show t
10   c <- toCalendarTime t
11   let cal = calendarTimeToString c
12   let t2 = toClockTime c
13       clock2 = show t2
14   if (clock == cal && clock == clock2)
15         then putStrLn "Ok."
16         else putStrLn "Failed."