Added normal form line to all sequences

svn: r4300
This commit is contained in:
Ryan Culpepper 2006-09-11 01:01:54 +00:00
parent de95ebcde4
commit 5b9cb7b96c
2 changed files with 10 additions and 14 deletions

View File

@ -43,15 +43,14 @@
(define set-cursor-suffix! set-cursor-suffixp!)
(define (cursor:new items)
(if (pair? items)
(make-cursor null items)
; A convenient lie
(make-cursor null (list #f))))
(make-cursor null items))
(define (cursor:current c)
(let ([suffix (cursor-suffix c)])
(car suffix)))
(if (pair? suffix)
(car suffix)
#f)))
(define (cursor:move-to-start c)
(when (cursor:can-move-previous? c)
(cursor:move-previous c)
@ -77,7 +76,7 @@
(set-cursor-prefix! c old-suffix-cell))))
(define (cursor:can-move-next? c)
(pair? (cdr (cursor-suffix c))))
(pair? (cursor-suffix c)))
(define (cursor:can-move-previous? c)
(pair? (cursor-prefix c)))

View File

@ -279,7 +279,7 @@
(let ([step (cursor:current steps)])
(unless step
(send sbview add-text "Normal form\n")
(send sbview add-syntax (deriv-e2 synth-deriv)))
(send sbview add-syntax (lift/deriv-e2 synth-deriv)))
(when (step? step)
(when (pair? (step-lctx step))
(for-each (lambda (bc)
@ -687,12 +687,9 @@
[()
(make-macro-stepper (new-hiding-policy) #f)]))
(define (go . stxs)
(define (go stx)
(let ([stepper (make-macro-stepper)])
(let loop ([stxs stxs])
(when (pair? stxs)
(send stepper add-deriv (trace (car stxs)))
(loop (cdr stxs))))))
(send stepper add-deriv (trace stx))))
(define (go/deriv deriv)
(let* ([f (new macro-stepper-frame%)]