Hello,
I want to write a macro that uses a help procedure. The following code
does not compile but in the interpreter it works and prints out "hi".
---------------------
(use syntax-case)
(define (macrohelper param)
param)
(define-syntax testsyntax
(lambda (x)
(syntax-case x ()
((_ foo)
(with-syntax ((bar (macrohelper (syntax foo))))
(syntax (display 'bar)))))))
(testsyntax hi)
(newline)
---------------------
The faq explains that during compilation "macrohelper" is not visible
but does not provide a solution :(
In the mailing list archive I found the suggestion to use eval-when
but that didn't work either.
(I changed the definition of macrohelper to:
---------------------
(eval-when (compile eval)
(define (macrohelper param)
param))
---------------------
)