Is there a way of inspecting the result of a macro expansion, or is that a too simplistic view on my part? I tried the macro stepper thing in DrRacket, but it throws up reams of things I’m not able to follow yet.
Can you give an example of what you want? The macro stepper is showing the results of expansion
Well, if I have something like (define-syntax (my-macro stx)
(syntax-case stx ()
[(_ name item1 item2)
#'(define (name old-state item1 item2 [deficit 0])
(match-let ;; more stuffs here
......)))]))
(my-macro fun 'thing1 thing2)
and I wanted to see only what the last line expanded to?
So expanding only “my” stuff — but maybe that’s naive on my part.
It’s clearly not the c pre-processor, right :slightly_smiling_face:
that should work in the macro stepper; that’s what “macro hiding” is about
is there a way to have DrRacket re-open the set of files being edited when closed ?
sort of persist session ?
Yes… I remember that someone write such an extension. But who?
Can’t find it.
Here’s what I see with that macro in the macro stepper:
:slightly_smiling_face: no worries thanks for letting me know, ill do some googling :smile:
so structs can be transparent ….
is there any way to make them transparents only when writing to a file ?
(define o (open-output-string))
(write file1 o)
(get-output-string o)
== "#<describe>"
where file1 is a struct “describe”
essentially im trying to dump & load a data struct to a file ..
@chris613 You probably want racket/serialize
awesome thanks
off to do some reading :slightly_smiling_face:
@stefan.kruger Also look at expand
and expand-syntax
.