Hi,

from time to time one has to deal with run time errors of Haskel
programs without having a debugger at hand. The trace function helps a
little, but laziness restricts its usefulness. Right now, I'm chasing a
{_undefined_array_element} error. I tried a lot up to now and suspect in 
the end the run time system might have a different evaluation order than 
I would like.

To know for sure, it would be *very helpful* to have a better error
message, stating at least the index of the undefined element and perhaps 
even the arrays name. I tried to enclose every array access with a trace 
call, but it didn't help.

I looked into the sources of hugs and ghc, but to no avail. In ghc, a
new array is initialized with 'error' expressions, but it appears to be
a bit difficult to provide the necessary information at this part of the 
program. In hugs, I don't know enogh about the run tim system and the
internal data structires to provide the information, and array.c, which
defines the array operations, was successfully obfuscated due to the
excessive (ab)use of the C preprocessor ;-)))

Can anyone help?

Thanks,
Nils
--
Nils Ellmenreich  -  Fakultat fur Mathematik/Informatik -        Nils @
http://www.fmi.uni-passau.de/~nils - Universitat Passau - Uni-Passau.DE


Reply via email to