blackhole
blackhole copied to clipboard
Investigate integration with the Gambit debugger
The integration with the Gambit debugger leaves a lot to be desired. For instance, evaluating
(let ((variable 5))
vvvariable)
will (correctly) give an error:
*** ERROR IN "(generated)"@1.1 -- Unbound variable: ~#vvvariable
1>
The 1>
prompt means that you are inside the scope where the error occured. If we would not use Black Hole, we would have been able to write variable
to get its value, and even continue the evaluation by evaluating ,(c variable)
. In Black Hole, it's not so easy. You can see what's in the lexical environment by typing ,e
:
1> ,e
1#variable = 5
1>
You can get the value of variable
by evaluating 1#variable
, but that's clearly not as elegant.
I have no idea of how to do this, but it would be really cool if Black Hole's macro expander would be aware of the changed environment in these cases.
One way to go to do this better might be to use Gambit's namespace
functionality, just to tighten the integration with the debugger.