[racket] Bindings' differences between 5.2.1 and 5.3
Hi!
I'm upgrading from version 5.2.1 to version 5.3 and I found a problem.
The idea is that the module "auto-req-lang.rkt" is like racket/base,
but when it is used as a language, it is automatically required
for-syntax. (The name is extracted automatically.) The original file
is much longer, but this is a minimal example that shows the
difference between the Racket versions.
In this case, the following "example.rkt" program works in 5.2.1 but
fails in 5.3
; version 5.2.1 ==> #f
; version 5.3 ==> Error: syntax: unbound identifier in the
transformer environment;
also, no #%app syntax transformer is bound in: syntax
Gustavo
;=== file: "auto-req-lang.rkt"
#lang racket/base
(require (for-syntax racket/base))
(provide (except-out (all-from-out racket/base) #%module-begin))
(provide (rename-out (module-begin #%module-begin)))
{define-syntax (module-begin stx)
(syntax-case stx ()
[(module-begin body ...)
(let-values ([(me-name ??) (module-path-index-split (car
(identifier-binding #'module-begin)))])
(with-syntax ([module-id (syntax-local-introduce #`#,me-name)])
#`(#%plain-module-begin
(require (for-syntax module-id))
body ...
)))])}
;=== end file: "auto-req-lang.rkt"
;=== file: "example.rkt"
#lang s-exp "auto-req-lang.rkt"
{define-syntax (just#f stx)
(syntax #f)}
(display (just#f))
;=== file: "example.rkt"