fixed PR 8703
svn: r6361
This commit is contained in:
parent
7b1a5db1df
commit
6a7b44f92e
|
@ -158,7 +158,10 @@
|
||||||
"there can only be one expression in the definitions window"
|
"there can only be one expression in the definitions window"
|
||||||
super-result)))]
|
super-result)))]
|
||||||
[(= 4 iteration-number)
|
[(= 4 iteration-number)
|
||||||
#`(eval '(current-namespace (module->namespace '#,(get-full-module-name))))]
|
#`(eval #,#`(#%app current-namespace
|
||||||
|
(#%app
|
||||||
|
module->namespace
|
||||||
|
'#,(get-full-module-name))))]
|
||||||
[else eof]))))
|
[else eof]))))
|
||||||
|
|
||||||
;; printer settings are just ignored here.
|
;; printer settings are just ignored here.
|
||||||
|
@ -405,18 +408,7 @@
|
||||||
(check-filename-matches filename
|
(check-filename-matches filename
|
||||||
(syntax-object->datum (syntax name))
|
(syntax-object->datum (syntax name))
|
||||||
unexpanded-stx))
|
unexpanded-stx))
|
||||||
|
(values v-name stx))]
|
||||||
|
|
||||||
(values v-name
|
|
||||||
stx)
|
|
||||||
|
|
||||||
;; this isn't working ...
|
|
||||||
#;
|
|
||||||
(let ([new-name (if filename
|
|
||||||
(build-name filename)
|
|
||||||
v-name)])
|
|
||||||
(values new-name
|
|
||||||
#`(module #,new-name lang (#%plain-module-begin bodies ...)))))]
|
|
||||||
[else
|
[else
|
||||||
(raise-syntax-error 'module-language
|
(raise-syntax-error 'module-language
|
||||||
"only module expressions are allowed"
|
"only module expressions are allowed"
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
(define tests
|
(define tests
|
||||||
(list
|
(list
|
||||||
|
|
||||||
(make-test ""
|
(make-test ""
|
||||||
#f
|
#f
|
||||||
(regexp "module-language: the definitions window must contain a module"))
|
(regexp "module-language: the definitions window must contain a module"))
|
||||||
|
@ -103,7 +102,21 @@
|
||||||
(provide s)
|
(provide s)
|
||||||
(define-syntax (s stx) e)))
|
(define-syntax (s stx) e)))
|
||||||
(format "~s ~s" '(require m) 's)
|
(format "~s ~s" '(require m) 's)
|
||||||
". module-lang-test-tmp2.ss:1:70: compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1")))
|
#rx"module-lang-test-tmp2.ss:1:70: compile: bad syntax; literal data is not allowed, because no #%datum syntax transformer is bound in: 1$")
|
||||||
|
|
||||||
|
(make-test (format "~s"
|
||||||
|
'(module tmp mzscheme
|
||||||
|
(provide (rename app #%app)
|
||||||
|
(rename -current-namespace current-namespace)
|
||||||
|
(rename -module->namespace module->namespace))
|
||||||
|
(define x 2)
|
||||||
|
(define -current-namespace error)
|
||||||
|
(define -module->namespace error)
|
||||||
|
(define-syntax app
|
||||||
|
(syntax-rules ()
|
||||||
|
((app . x) '(app . x))))))
|
||||||
|
"x"
|
||||||
|
"2")))
|
||||||
|
|
||||||
;; set up for tests that need external files
|
;; set up for tests that need external files
|
||||||
(call-with-output-file (build-path this-dir "module-lang-test-tmp.ss")
|
(call-with-output-file (build-path this-dir "module-lang-test-tmp.ss")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user