PreTraceHook, PostTraceHook and ErrorHdrHook hooks in RTS
ka2_mail at yahoo.com
Fri Feb 6 12:07:12 EST 2004
Dear GHC team,
The current RTS hooks allow to change the default
behaviour of "trace" and "error" functions in Haskell.
The disadvantage of the current implementation is that
one can change either the header or the footer of the
displayed message. In some cases it is useful to do
something more. For example in GUI application it is
better to display the error message in a dialog box
instead of dumping it to the error console. On the
other hand under Windows we may want to dump a trace
messages to the debug console (OutputDebugString)
insted of dumping it to the error console.
My proposal is to replace the hooks:
void PreTraceHook(long fd);
void PostTraceHook(long fd);
void ErrorHdrHook(long fd);
with the general hooks:
void TraceHook(char *msg)
void ErrorHook(char *msg)
fprintf(stderr, "Fail: %s", msg);
I am waiting forward to your comments and proposals.
If you accept the idea, I will be happy to implement
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
More information about the Cvs-ghc