[racket] define-for-syntax and racket/base
At Fri, 17 Dec 2010 07:58:30 -0500, Neil Van Dyke wrote:
> Why does the following module give an error, "compile: unbound
> identifier in the transformer environment (and no #%app syntax
> transformer is bound) in: string-append", but does not give an error if
> "racket/base" is changed to "racket"?
>
> #lang racket/base
> (define-for-syntax aaa (string-append "x" "y" "z"))
`racket' re-exports `racket/base' for syntax, while `racket/base'
doesn't export anything for syntax.
It's common to have
#lang racket/base
(require (for-syntax racket/base))
as in
#lang racket/base
(require (for-syntax racket/base))
(define-for-syntax aaa (string-append "x" "y" "z"))