Here is a read-eval-print-loop which, given an eval, evaluates forms.
writes expressions from
(current-output-port) until an
end-of-file is encountered.
repl:quit dynamically bound during
Exits from the invocation of
repl: procedures establish, as much as is possible to do
portably, a top level environment supporting macros.
dynamic-wind to catch error conditions
and interrupts. If your implementation supports this you are all set.
Otherwise, if there is some way your implementation can catch error
conditions and interrupts, then have them call
will display its arguments and reenter
slib:error dynamically bound by
To have your top level loop always use macros, add any interrupt catching lines and the following lines to your Scheme init file: