From 07bea4136c5b823f32268a1f52c849f3a80a55d0 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 22 Feb 2007 21:49:46 +0000 Subject: [PATCH] Macro stepper: moved local-expansion context to bottom svn: r5667 --- collects/macro-debugger/view/gui.ss | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/collects/macro-debugger/view/gui.ss b/collects/macro-debugger/view/gui.ss index 885fa6d12d..d719682803 100644 --- a/collects/macro-debugger/view/gui.ss +++ b/collects/macro-debugger/view/gui.ss @@ -475,17 +475,15 @@ [(not step) (update:show-final)])))) - (define/private (update:show-lctx lctx) + (define/private (update:show-lctx step) + (define lctx (protostep-lctx step)) (when (pair? lctx) + (send sbview add-text "\n") (for-each (lambda (bf) (send sbview add-text - "While executing macro transformer in:\n") + "while executing macro transformer in:\n") (insert-syntax/redex (bigframe-term bf) (bigframe-foci bf))) - lctx) - (send sbview add-text "\n"))) - - (define/private (update:show-protostep step) - (update:show-lctx (protostep-lctx step))) + (reverse lctx)))) (define/private (update:separator step) (insert-step-separator (step-type->string (protostep-type step)))) @@ -495,25 +493,24 @@ (step-type->string (protostep-type step)))) (define/private (update:show-step step) - (update:show-protostep step) (insert-syntax/redex (step-term1 step) (step-foci1 step)) (update:separator step) - (insert-syntax/contractum (step-term2 step) (step-foci2 step))) + (insert-syntax/contractum (step-term2 step) (step-foci2 step)) + (update:show-lctx step)) (define/private (update:show-prestep step) - (update:show-protostep step) (update:separator/small step) (insert-syntax/redex (prestep-term1 step) - (prestep-foci1 step))) + (prestep-foci1 step)) + (update:show-lctx step)) (define/private (update:show-poststep step) - (update:show-protostep step) (update:separator/small step) (insert-syntax/contractum (poststep-term2 step) - (poststep-foci2 step))) + (poststep-foci2 step)) + (update:show-lctx step)) (define/private (update:show-misstep step) - (update:show-protostep step) (insert-syntax/redex (misstep-term1 step) (misstep-foci1 step)) (update:separator step) @@ -521,7 +518,8 @@ (send sbview add-text "\n") (when (exn:fail:syntax? (misstep-exn step)) (for-each (lambda (e) (send sbview add-syntax e)) - (exn:fail:syntax-exprs (misstep-exn step))))) + (exn:fail:syntax-exprs (misstep-exn step)))) + (update:show-lctx step)) (define/private (update:show-final) (let ([result (lift/deriv-e2 synth-deriv)])