expander: reapirs for implicit-form errors

Add missing source for unavailable `#%datum`, etc., and
other similar adjustments.
This commit is contained in:
Matthew Flatt 2018-03-07 10:05:19 -07:00
parent 3438b888a2
commit 909fed6f2f
3 changed files with 8 additions and 6 deletions

View File

@ -94,7 +94,7 @@
[else
(define (add-top-interaction s)
(namespace-syntax-introduce
(datum->syntax s (cons '#%top-interaction s))))
(datum->syntax #f (cons '#%top-interaction s) s)))
(call-with-input-file*
path
(lambda (i)

View File

@ -19,16 +19,18 @@
(define unbound? (and trigger-id (not (resolve trigger-id phase))))
(raise-syntax-error #f
(format (if unbound?
"unbound identifier;\n also, no ~a transformer is bound~a"
"unbound identifier;\n also, no ~a syntax transformer is bound~a"
(string-append what " is not allowed;\n no ~a syntax transformer is bound~a"))
sym
(case phase
[(0) ""]
[(1) " in the transformer phase"]
[else (format " at phase ~a" phase)]))
(and unbound? trigger-id)
(and unbound?
(not (eq? (syntax-e s) (syntax-e trigger-id)))
s)
(if unbound?
trigger-id
s)
null
(if unbound? (syntax-debug-info-string trigger-id ctx) "")))

View File

@ -16927,7 +16927,7 @@ static const char *startup_source =
" #f"
"(format"
"(if unbound?_0"
" \"unbound identifier;\\n also, no ~a transformer is bound~a\""
" \"unbound identifier;\\n also, no ~a syntax transformer is bound~a\""
" (string-append what_1 \" is not allowed;\\n no ~a syntax transformer is bound~a\"))"
" sym_27"
"(let-values(((tmp_17) phase_44))"
@ -16936,8 +16936,8 @@ static const char *startup_source =
"(if(equal? tmp_17 1)"
" (let-values () \" in the transformer phase\")"
" (let-values () (format \" at phase ~a\" phase_44))))))"
"(if unbound?_0 trigger-id_0 #f)"
"(if unbound?_0(if(not(eq?(syntax-e$1 s_0)(syntax-e$1 trigger-id_0))) s_0 #f) #f)"
"(if unbound?_0 trigger-id_0 s_0)"
" null"
" (if unbound?_0 (syntax-debug-info-string trigger-id_0 ctx_8) \"\"))))))))"
"(define-values(make-check-no-duplicate-table)(lambda()(begin '#hasheq())))"
@ -59402,7 +59402,7 @@ static const char *startup_source =
"(begin"
" 'add-top-interaction"
"(1/namespace-syntax-introduce"
"(1/datum->syntax s_429(cons '#%top-interaction s_429)))))))"
"(1/datum->syntax #f(cons '#%top-interaction s_429) s_429))))))"
"(let-values(((path1_0) path_12)"
"((temp2_8)"
"(lambda(i_84)"