RE: Two minor reports concerning GHC
(1) unhelpful error message from GHCi:
[[ Compiling ParsecPrim ( F:\Haskell\Lib/ParsecPrim.hs, interpreted ) WARNING: ignoring polymorphic case in interpreted mode. Possibly due to strict polymorphic/functional constructor args. Your program may leak space unexpectedly. ]] I don't understand what this is trying to say, and the lack of a source code line number doesn't give me any chance to study the code for clues. This warning is GHCi only.
It is warning you about a bug in GHC. Fortunately, the bug has been fixed in the forthcoming 6.0 release.
(2) Strange behaviour of GHCs Time.diffClockTimes function:
This code fragment: [[ runTest t = do { st <- Time.getClockTime ; putStr $ "Test started: "++show st++"\n" ; runTestTT t ; ft <- Time.getClockTime ; putStr $ "Test finished: "++show ft++"\n" ; let et = Time.diffClockTimes ft st ; putStr $ "Test duration: "++show et++"\n" } ]]
yields this output: [[ Test duration: TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 9, tdPicosec = -437000000000} ]]
This is reasonable, as far as I can tell. The only requirement on a TimeDiff is that: t1 `addToClockTime` (t1 `diffClockTimes` t2) == t2 and the TimeDiff above does just that. It *could* be normalised so that the signs of the two components are the same, but the current implementation doesn't do that. Cheers, Simon
participants (1)
-
Simon Marlow