[plt-scheme] using a defined procedure in a syntax-case form
Hi,
I'm trying to use a helper function I defined in the same module in a
syntax-case form, but I keep getting "unbound variable" errors.
Here's an example:
--------------------------
#lang scheme
(define (a str)
(string-append "a" str))
(define-syntax b
(lambda (stx)
(syntax-case stx ()
((_ str)
(with-syntax ([str2 (datum->syntax #'str (a (syntax->datum
#'str)))])
#'str2)))))
--------------------------
error: expand: unbound variable in module (transformer environment)
in: a
Thanks for the help,
- Filipe Cabecinhas