1

may be redundance with : Macro stepper in DrRacket

but my question here is "why I have no buttons "Previous term" and "Next term".in my macro-stepper? I notice there: http://www.ccs.neu.edu/home/ryanc/macro-stepper/macro-stepper-Z-H-1.html#node_chap_1 say:

When your program consists of multiple top-level definitions or expressions, the macro stepper also provides “Previous term” and “Next term” buttons to go up and down in the terms of your program.

in my opinion,top-level mean "in a module",but what the "multiple top-level definitions" means?can someone give me a example to explanations it? I have try write two define-rule macro in different and export them ,and have seen the two macro in macro-steper occur ,but there still not the "next term".

is there have any more articles on how to use it? Is it because that article is out of date and there is no "previous term" and "next term" button in the current dracket?

DrRacket version: 7.6 in windows10

I find this :

https://github.com/racket/macro-debugger/blob/13ee731da98fbe14a0d486d614a5c46f26ccd933/macro-debugger/macro-debugger/macro-debugger.scrbl#L258

https://github.com/racket/macro-debugger/blob/master/macro-debugger/macro-debugger/view/stepper.rkt#L84

but I still not know what "multiple top-level definitions"means..

I have try create two file ,and the source like that: https://i.stack.imgur.com/uTwr4.jpg https://i.stack.imgur.com/8JmPW.jpg

and when I begin macro-stepper,it show like that:

https://i.stack.imgur.com/9mYrB.jpg there only have four button,not the"previous term" and "next term". or I misunderstanding the "multiple top-level definitions"?

update:I find this:

If the macro stepper is showing multiple expansions, then it also provides “Previous term” and “Next term” buttons to go up and down in the list of expansions. Horizontal lines delimit the current expansion from the others.

  • Screenshot? Please. – soegaard May 02 '20 at 09:59
  • Show a screenshot where the buttons are missing. – soegaard May 02 '20 at 10:20
  • @soegaard:can you show me a example about "multiple top-level definitions",thanks! –  May 02 '20 at 10:25
  • @soegaard:sorry ,it seem I can't upload two picture on the question –  May 02 '20 at 10:34
  • Upload it to imgur and paste the link. – soegaard May 02 '20 at 10:35
  • @soegaard : I have upload it. –  May 02 '20 at 10:41
  • The four buttons shown at the top are “go to start”, “prev term”, “next term” and “go to end”. – soegaard May 02 '20 at 10:45
  • @soegaard : but I see there is another layout : https://imgur.com/dtgxdGi –  May 02 '20 at 10:48
  • @soegaard : where the "step->" and "next term" a difference things –  May 02 '20 at 10:49
  • Now I see what you mean. Certain programs will make the macro stepper show these buttons. I am not sure which ones. FWIW the new manual is here: https://docs.racket-lang.org/macro-debugger/index.html?q=macro%20debugger#%28part._.Using_the_.Macro_.Stepper%29 – soegaard May 02 '20 at 11:09
  • @soegaard : thanks ,I have try to read it once ago,but because not sure what "multiple top-level definitions" is ,so maybe I write a incorrect example. I wise if someone can tell me. whatever,it's not a big problem,I can't spend a afternoon on that anymore. –  May 02 '20 at 11:17

1 Answers1

2

I'm not sure there's still a way to get a macro stepper multiple terms using the "Macro Stepper" button in DrRacket, but you can also use macro-stepper-repl from the macro-debugger/stepper library.

Note: in recent versions of Racket (up to and including Racket 7.7), macro-stepper-repl will often show "terms" that look like garbage starting with the characters #~ --- that's how Racket prints "compiled expressions". Those shouldn't be displayed, but there's a bug in the code that tries to filter them out. You can delete those terms from the macro stepper using "Remove selected term" from the "Stepper" menu.

Ryan Culpepper
  • 10,495
  • 4
  • 31
  • 30