RFC: Time Library 0.1

John Meacham john at repetae.net
Tue Jul 5 19:07:03 EDT 2005


It needs a 
getTAItime :: IO AbsoluteTime
and  a 
getLeapSecondTable :: IO LeapSecondTable 

Many systems have ways to get at these and it would be a travesty if we
didn't fix this hole in the API when we have the chance. As always, the
library should make its best effort to get at this info. which on POSIX
systems might be converting from UTCtime. but on other systems, TAItime
might be the accurate one and UTCtime will have to be aproximated from
it. (or on systems with up-to-date leap second tables they can both be
accurate). 

Also, it would be nice if the LeapSecondTable was not a functional type,
but rather something with structure, like a list of (year,offset) pairs.
There could be apps that will have to look at which years the leap
seconds actually occured in and probing the function with every possible
value in its domain is not very fun.

Also, shouldn't AbsoluteTime be an instance of several Num classes? 

What units does DiffTime have? is it relative, or is the length of
a DiffTime independent of what you do to it?

        John
-- 
John Meacham - ⑆repetae.net⑆john⑈ 


More information about the Libraries mailing list