Now all module syntax errors kill the repl
svn: r10314
This commit is contained in:
parent
8e4e964a65
commit
b6827d2d0b
|
@ -148,8 +148,7 @@
|
||||||
(let ([super-result (super-thunk)])
|
(let ([super-result (super-thunk)])
|
||||||
(if (eof-object? super-result)
|
(if (eof-object? super-result)
|
||||||
#`(current-module-declare-name #f)
|
#`(current-module-declare-name #f)
|
||||||
(raise-syntax-error
|
(hopeless-shout
|
||||||
'|Module Language|
|
|
||||||
"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)
|
[(4)
|
||||||
|
@ -436,18 +435,17 @@
|
||||||
(define (check-filename-matches filename name unexpanded-stx)
|
(define (check-filename-matches filename name unexpanded-stx)
|
||||||
(define datum (syntax-e name))
|
(define datum (syntax-e name))
|
||||||
(unless (symbol? datum)
|
(unless (symbol? datum)
|
||||||
(raise-syntax-error '|Module Language|
|
(hopeless-shout "bad syntax in name position of module"
|
||||||
"bad syntax in name position of module"
|
unexpanded-stx name))
|
||||||
unexpanded-stx name))
|
|
||||||
(let-values ([(base name dir?) (split-path filename)])
|
(let-values ([(base name dir?) (split-path filename)])
|
||||||
(let ([expected (string->symbol
|
(let ([expected (string->symbol
|
||||||
(path->string (path-replace-suffix name #"")))])
|
(path->string (path-replace-suffix name #"")))])
|
||||||
(unless (equal? expected datum)
|
(unless (equal? expected datum)
|
||||||
(raise-syntax-error
|
(hopeless-shout
|
||||||
'|Module Language|
|
(format
|
||||||
(format "module name doesn't match saved filename, got ~s and expected ~a"
|
"module name doesn't match saved filename, got ~s and expected ~s"
|
||||||
datum
|
datum
|
||||||
expected)
|
expected)
|
||||||
unexpanded-stx)))))
|
unexpanded-stx)))))
|
||||||
|
|
||||||
(define module-language-put-file-mixin
|
(define module-language-put-file-mixin
|
||||||
|
|
Loading…
Reference in New Issue
Block a user