macro-stepper: better internal debugging

original commit: cb62eeffb6cacf0a8488176804fe722544bb5e73
This commit is contained in:
Ryan Culpepper 2010-07-13 10:53:04 -06:00
parent 2d29222912
commit 44672c7c5d
2 changed files with 27 additions and 23 deletions

View File

@ -150,7 +150,7 @@
(current-state-with v (with-syntax1 ([p f]) fs)))]
[type-var type])
(DEBUG
(printf "visibility = ~s\n" (visibility))
(printf "visibility = ~s\n" (if (visibility) 'VISIBLE 'HIDDEN))
(printf "step: s1 = ~s\n" s)
(printf "step: s2 = ~s\n\n" s2))
(let ([ws2
@ -324,7 +324,7 @@
(visibility-off (not previous-pass-hides?)
v
(lambda ()
(print-viable-subterms v)
(when #f (print-viable-subterms v))
(R** f v p s ws clause ... => k))
#t))]
@ -495,6 +495,9 @@
(define (seek-point stx vstx k)
(if (visibility)
(k vstx)
(begin
(DEBUG (printf "Seek point\n")
(print-viable-subterms stx))
(let ([paths (table-get (subterms-table) stx)])
(cond [(null? paths)
(DEBUG (printf "seek-point: failed on ~.s\n" (stx->datum stx)))
@ -514,7 +517,7 @@
(lambda (ws exn)
(RSfail ws exn)))))]
[else
(raise (make nonlinearity stx paths))]))))
(raise (make nonlinearity stx paths))])))))
(provide print-viable-subterms)
(define (print-viable-subterms stx)

View File

@ -112,7 +112,8 @@
rename-case-lambda
rename-let-values
rename-letrec-values
rename-lsv)))
rename-lsv
track-origin)))
(define (rewrite-step? x)
(and (step? x) (not (rename-step? x))))