Session: ---<br><br>~/dynamic$ cat t2.scm<br>(define-macro (assert-equal lhs rhs)<br> (let ((g-lhs (gensym))<br> (g-rhs (gensym))<br> (e-lhs (gensym))<br> (e-rhs (gensym)))<br> `(let ((,g-lhs ,lhs) (,g-rhs ,rhs)<br>
(,e-lhs ',lhs) (,e-rhs ',rhs))<br> (if (not (equal? ,g-lhs ,g-rhs))<br> (pp `(,,e-lhs = ,,g-lhs <> ,,g-rhs = ,,e-rhs))))))<br><br>(pp (lambda ()<br> (assert-equal (+ 1 2) (- 3 4))) (current-output-port))<br>
<br>~/dynamic$ gsi t2.scm<br>(lambda ()<br> (let ((#:g0 (+ 1 2)) (#:g1 (- 3 4)) (#:g2 '(+ 1 2)) (#:g3 '(- 3 4)))<br> (if (not (equal? #:g0 #:g1))<br> (pp `(,#:g2<br> ,@`(,'= ,@`(,#:g0 ,@`(,'<> ,@`(,#:g1 ,@`(,'= ,@`(,#:g3 ,@'())))))))))))<br>
~/dynamic$ <br><br><br>Question: ---<br><br>Why do I have:<br><br> (pp `(,#:g2<br>
,@`(,'= ,@`(,#:g0 ,@`(,'<> ,@`(,#:g1 ,@`(,'= ,@`(,#:g3 ,@'())))))))))))<br>
<br>?<br><br>It seems prettier as:<br><br>`(,#:g2 '= ,#:g0 '<> ...)<br><br>the ,@` seems extraneous<br><br>