Wed, 18 Jun 2003 19:18:28 +0100
On 2003-06-18 at 19:17+0200 Dylan Thurston wrote:
> On Wed, Jun 18, 2003 at 11:22:55AM +0100, Simon Marlow wrote:
> > -- | Convert a 'ClockTime' to a 'CalendarTime' in the current timezone
> > clockTimeToCalendarTime :: ClockTime -> IO CalendarTime
> > -- | Convert a 'ClockTime' to a 'CalendarTime' in UTC
> > clockTimeToUTCTime :: ClockTime -> CalendarTime
> clockTimeToUTCTime also needs to return IO CalendarTime, since it will
> certainly need to look up a table of leap seconds.
Looking things up in tables isn't IO per se. Are you saying
that the table changes sufficiently often that it can't be
regarded as constant, and that as a consequence
clockTimeToUTCTime c doesn't always have the same value?
Now, I know from the earlier discussion that for far future
dates the leap seconds will be unknown, but isn't this a
case of going from _|_ to a value, rather than a change of
(non-_|_) value? While I can live with the idea that a
programme may be undefined if it computes dates far enough
in the future, I'd be unhappy if running it one day gives
one answer and on another gives something else.
This particular can seems to contain the "need for a number
representation that can be inspected lazily to a certain
Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk