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