Bug in Time module

2001-09-26 Thread Koen Claessen
Hi, I discovered a bug in the Time module.  If I run the following code snippet: main :: IO () main = do t0 - getClockTime system sleep 120 t1 - getClockTime print (t1 `diffClockTimes` t0) The TimeDiff value has a tdSec field greater than 59, and a tdMin field of 0

Re: Bug in Time module

2001-09-26 Thread Michael Weber
On Wed, Sep 26, 2001 at 16:21:09 +0200, Koen Claessen wrote: I discovered a bug in the Time module.  If I run the following code snippet: Just one? ;) [...] The TimeDiff value has a tdSec field greater than 59, and a tdMin field of 0. I guess this is a bug. I am running ghc-5.00.2

RE: Bug in Time module

2001-09-26 Thread Simon Marlow
I discovered a bug in the Time module.  If I run the following code snippet: main :: IO () main = do t0 - getClockTime system sleep 120 t1 - getClockTime print (t1 `diffClockTimes` t0) The TimeDiff value has a tdSec field greater than 59, and a tdMin

RE: Bug in Time module

2001-09-26 Thread Koen Claessen
| I'm not sure it's a bug - Haskell 98 doesn't require | that the TimeDiff value returned from diffClockTimes | is normalised in any way, and it can't be done in | general of course because months and years have | different numbers of days, even minutes have different | numbers of seconds