Hippo
Hippo

Reputation: 510

Does Guile allow me to enter a replacement for a missing value like CLISP does?

When I try to run code such as the following in CLISP, without defining foo...

(+ 2 foo)

...then I get an error saying that foo has no value, but also the option to manually enter a replacement value instead:


*** - SYSTEM::READ-EVAL-PRINT: variable FOO has no value
The following restarts are available:
USE-VALUE      :R1      Input a value to be used instead of FOO.
STORE-VALUE    :R2      Input a new value for FOO.
ABORT          :R3      Abort main loop
Break 1 [2]>

I can then enter use-value which prompts me to manually enter a value instead of foo and continue with the execution, or store-value which saves my entered value into the foo variable while continuing with execution. This helps me test code faster because I can enter a manual value as a stopgap measure and see if the rest of the code works.

In Guile, running the same flawed code drops me into a debug console, but I couldn't find any way to enter a replacement value and continue execution. Is there a way to enable this (either through native functionality or through some custom addon)?

Upvotes: 0

Views: 26

Answers (0)

Related Questions