Closed mnieper closed 8 years ago
In the meantime, I have found the application that causes the error detected by the compiler. So, the issue reduces to: Is it possible to give a more helpful error message (e.g. a message that points to the problematic form)?
Larceny should report the source line number, but the macro expander doesn't track line numbers through macro expansion so Larceny's compiler can only report the line number for the top-level form. With R6RS and R7RS libraries, that wouldn't help much. Furthermore, R6RS and R7RS top-level programs get turned into pseudo-libraries, so line numbers for top-level forms wouldn't help much even with R6RS/R7RS top-level programs.
The right thing to do here is to track line numbers at least one level further down, but that's a bit hard to implement in Larceny because Andre van Tonder's portable library/macro system contains no provision for tracking line numbers.
Until this gets fixed, one partial workaround is to use the (compile-despite-errors #t)
compiler switch to convert this error into a warning, and then try to find the location of the error via execution-based testing.
I'm going to treat this as a duplicate for ticket #301
I get the following error when trying to run a (rather huge) program with Larceny:
Is this a compiler bug or an error the user is supposed to see? In case of the latter, is there any advice how it could be debugged?
program.zip