Hi chickenemers,
I would like to read a file containing macro definitions and a source file, and output the source file after macro expansion, but before evaluation.
So, for example, if I have the following macro in macro.scm:
(define-syntax foo
(syntax-rules ()
((foo) (+ 1 1))))
And I have the following in the source.scm:
(* (foo) 10)
I would like to run "mystery-command macro.scm source.scm" and get:
(* (+ 1 1) 10)
I have been poking around, and it seems like there are a few things that almost do what I want, like the top-level command ",x" and (expand) from unit expand.
Is there an easy way to do this? Like with some mysterious flag to csi or csc that just outputs its macro-expanded input?
Thanks!
Best,
Casey