diff --git a/collects/syntax/private/stxparse/runtime.rkt b/collects/syntax/private/stxparse/runtime.rkt index b042b7bced..d57e46bebb 100644 --- a/collects/syntax/private/stxparse/runtime.rkt +++ b/collects/syntax/private/stxparse/runtime.rkt @@ -612,7 +612,9 @@ An Expectation is one of ;; FIXME: change to normal 'error', if src gets stripped away (define (check-literal id phase ctx) (unless (identifier-binding id phase) - (raise-syntax-error #f "unbound identifier not allowed as literal" ctx id))) + (raise-syntax-error #f + (format "literal is unbound in phase ~s" phase) + ctx id))) ;; free-identifier=?/phases : id phase-level id phase-level -> boolean ;; Determines whether x has the same binding at phase-level phase-x diff --git a/collects/syntax/private/stxparse/sc.rkt b/collects/syntax/private/stxparse/sc.rkt index ec094b831a..6eb2ce79c5 100644 --- a/collects/syntax/private/stxparse/sc.rkt +++ b/collects/syntax/private/stxparse/sc.rkt @@ -163,7 +163,7 @@ (begin-for-syntax/once (for ([x (syntax->list #'(external ...))]) (unless (identifier-binding x 0) - (raise-syntax-error #f "unbound identifier not allowed as literal" + (raise-syntax-error #f "literal is unbound in phase 0" (quote-syntax #,stx) x))))))))])) #|