If I fire up gsi, I can do:
> (+ 1 (+ 2 'a))
*** ERROR IN (console)@3.6 -- (Argument 2) NUMBER expected
(+ 2 'a)
1> ,(c 3)
4
$ cat test.scm:
(eval '(+ 1 (+ 2 'a)))
$ gsi test.scm
*** ERROR -- (Argument 2) NUMBER expected
(+ 2 'a)
$
okay ... so gsi dies on me, I look into main.scm (in the gambit source, this repl-debug function looks like what I wnat)
$ cat test2.scm
cat test2.scm
(define (my-eval x)
(with-exception-catcher
##repl-debug
(lambda ()
(pp x)
(eval x))))
(pp (my-eval '(+ 1 (+ 2 'a))))
$ gsi test2.scm
(+ 1 (+ 2 'a))
> ,(c 3)
3
$
I dislike this for two reasons. 1) I miss the error statement of: *** ERROR -- (Argument 2) NUMBER expected
and 2) I get 3 instead of 4.
How can i correct these two? I suspect this is likely a 2 line fix since the functionality already exists.
thanks!
--
-- symbolic expression