Debugging

This commit is contained in:
Justin Ethier 2016-09-14 04:11:56 -04:00
parent 40071e433f
commit 9e6fb14e7f
2 changed files with 7 additions and 0 deletions

View file

@ -1194,6 +1194,8 @@
(define-syntax syntax-rules
(er-macro-transformer
(lambda (expr rename compare)
;(Cyc-write `(syntax-rules expand ,expr) (current-output-port))
;(Cyc-display "\n" (current-output-port))
(let ((ellipsis-specified? (identifier? (cadr expr)))
(count 0)
(_er-macro-transformer (rename 'er-macro-transformer))
@ -1412,6 +1414,10 @@
(list
_er-macro-transformer
(list _lambda (list _expr _rename _compare)
;(Cyc-write `(syntax-rules expand ,_expr) (current-output-port))
;(Cyc-display "\n" (current-output-port))
;(list 'Cyc-write (list 'syntax-rules 'expand _expr) (list 'current-output-port))
;(list 'Cyc-display "\n" (list 'current-output-port))
(list
_car
(cons

View file

@ -404,6 +404,7 @@
;; TODO: what if expr is a syn closure?
(make-sc env free-names expr))
(define (strip-syntactic-closures expr)
;; TODO: no, recursively traverse form and replace the sc's
(identifier->symbol expr))
(define (identifier? expr)
(or (symbol? expr)