blackhole
blackhole copied to clipboard
More Gambit-y errors from the macro expander
Right now, macro expansion errors are reported with the error
procedure. For instance, (cond-expand a)
generates the error *** ERROR IN ##main -- Invalid cond-expand form: (cond-expand a)
, but this is not optimal, since it doesn't give information about the source location. In Gambit there is a procedure called c#compiler-user-error
which is used internally to generate Gambit's error messages. It might be better to use that instead of just error
.
I'm not entirely sure that this is a desirable thing, but I think so. Fixing this would mean to implement a small utility function that calls c#compiler-user-error
and put it in util.scm, and then searching through the calls to error
in hygiene.scm, replacing the calls where appropriate.
Vote for this feature :)