Two minor reports concerning GHC
Graham Klyne
gk@ninebynine.org
Wed, 28 May 2003 23:59:52 +0100
I've noticed a couple of very minor issues with GHC[i]:
(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.
(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}
]]
In particular, tdSec and tdPicosec have different signs. I don't see what
reasonable implementation would yield such a result. I've observed this
with programs running interactively under GHCi, and also stand-alone
executables.
These tests using GHC 5.04.3, on Windows 2000.
#g
--
BTW, I found the GHC profiler to be very useful, and easy to use. I'm
impressed!
-------------------
Graham Klyne
<GK@NineByNine.org>
PGP: 0FAA 69FF C083 000B A2E9 A131 01B9 1C7A DBCA CB5E