I'd like to rewrite (ice-9 history) to conform to the full GDB value history syntax. This is because I find that I miss being able to refer to "the last value" etc.
Currently we have:
$<N> the N:th value from the start
The extension would add bindings for:
$$<N> the N:th value from the end
$ the last value (= $$0)
$$ the value just prior to the last value (= $$1)
Implementation:
Currently, every step in the REPL defines a $<N> in the module (value-history) the interface of which is appended to the list of used interfaces for the (current-module).
The new implementation would just add a new result value to a list, not doing any definition.
The interface of (value-history) would instead have a lazy-binder which provides a syntax transformer for every $... actually being used. The $... identifier would expand into a list-ref into the value history.
Please evaluate this suggestion and give comments or an OK.
Best regards,
Mikael Djurfeldt