[plt-scheme] The infamous "no #%app syntax transformer is bound" error
Jens Axel Søgaard skrev:
> Now let's put this pattern in a module embodied by plambda:
>
> > (module plambda mzscheme
> (provide plambda)
> (define-syntax plambda
> (lambda (so)
> (syntax-case so ()
> [(_ (id ...) b)
> #'(lambda (stx)
> (datum->syntax-object #'here
> (syntax-case stx ()
> [(_ id ...)
> b])))])))
> )
Ah! I need a require-for-template ...
(module plambda mzscheme
(provide plambda)
(require-for-template mzscheme)
(define-syntax plambda
(lambda (so)
(syntax-case so ()
[(_ (id ...) b)
#'(lambda (stx)
(datum->syntax-object #'here
(syntax-case stx ()
[(_ id ...)
b])))])))
)
--
Jens Axel Søgaard