diff --git a/racket/src/bc/src/startup.inc b/racket/src/bc/src/startup.inc index db5c456c55..7ab32f77b4 100644 --- a/racket/src/bc/src/startup.inc +++ b/racket/src/bc/src/startup.inc @@ -60960,8 +60960,12 @@ static const char *startup_source = "(let-values()" "(let-values(((in83_0) in_0)" "((config84_0) config_0)" -" ((temp85_0) \"`~a` not enabled\")" -"((extend-str86_0) extend-str_0))" +" ((temp85_0) \"`~a` not enabled\\n possible reason: ~a\")" +"((extend-str86_0) extend-str_0)" +"((temp87_0)" +"(string-append" +" \"not allowed again inside a module that already starts `#lang`,\"" +" \" or not enabled for interactive evaluation\")))" "(reader-error.1" " unsafe-undefined" " '#\\x" @@ -60970,7 +60974,7 @@ static const char *startup_source = " in83_0" " config84_0" " temp85_0" -"(list extend-str86_0)))))" +"(list extend-str86_0 temp87_0)))))" "(values))))" "(let-values(((line_0 col_0 pos_0)(port-next-location in_0)))" "(let-values(((accum-str_0)(accum-string-init! config_0)))" @@ -61007,22 +61011,22 @@ static const char *startup_source = "(let-values()" "(begin" "(consume-char/special in_0 config_0 c_0)" -"(let-values(((in87_0) in_0)" -"((config88_0) config_0)" -"((c89_0) c_0)" -"((temp90_0)" +"(let-values(((in88_0) in_0)" +"((config89_0) config_0)" +"((c90_0) c_0)" +"((temp91_0)" " \"found non-character while reading `#~a`\")" -"((extend-str91_0)" +"((extend-str92_0)" " extend-str_0))" "(reader-error.1" " unsafe-undefined" -" c89_0" +" c90_0" " #f" " unsafe-undefined" -" in87_0" -" config88_0" -" temp90_0" -"(list extend-str91_0)))))" +" in88_0" +" config89_0" +" temp91_0" +"(list extend-str92_0)))))" "(if(if(char-whitespace? c_0)" "(positive?" "(accum-string-count accum-str_0))" @@ -61032,21 +61036,21 @@ static const char *startup_source = "(char=? c_0 '#\\space)" " #f)" "(let-values()" -"(let-values(((in92_0) in_0)" -"((config93_0) config_0)" -"((temp94_0)" +"(let-values(((in93_0) in_0)" +"((config94_0) config_0)" +"((temp95_0)" " \"expected a single space after `~a`\")" -"((extend-str95_0)" +"((extend-str96_0)" " extend-str_0))" "(reader-error.1" " unsafe-undefined" " '#\\x" " #f" " unsafe-undefined" -" in92_0" -" config93_0" -" temp94_0" -"(list extend-str95_0))))" +" in93_0" +" config94_0" +" temp95_0" +"(list extend-str96_0))))" "(if(let-values(((or-part_0)" "(char-lang-nonsep?" " c_0)))" @@ -61063,71 +61067,71 @@ static const char *startup_source = "(let-values()" "(begin" "(consume-char in_0 c_0)" -"(let-values(((in96_0) in_0)" -"((config97_0)" +"(let-values(((in97_0) in_0)" +"((config98_0)" " config_0)" -"((temp98_0)" +"((temp99_0)" "(string-append" " \"expected only alphanumeric, `-`, `+`, `_`, or `/`\"" " \" characters for `~a`, found `~a`\"))" -"((extend-str99_0)" +"((extend-str100_0)" " extend-str_0)" -"((c100_0) c_0))" +"((c101_0) c_0))" "(reader-error.1" " unsafe-undefined" " '#\\x" " #f" " unsafe-undefined" -" in96_0" -" config97_0" -" temp98_0" +" in97_0" +" config98_0" +" temp99_0" "(list" -" extend-str99_0" -" c100_0)))))))))))))))" +" extend-str100_0" +" c101_0)))))))))))))))" " loop_0))" "(values))))" "(let-values(((lang-str_0)" -"(let-values(((accum-str101_0) accum-str_0)((config102_0) config_0))" -"(accum-string-get!.1 0 accum-str101_0 config102_0))))" +"(let-values(((accum-str102_0) accum-str_0)((config103_0) config_0))" +"(accum-string-get!.1 0 accum-str102_0 config103_0))))" "(let-values((()" "(begin" " (if (equal? lang-str_0 \"\")" "(let-values()" -"(let-values(((in103_0) in_0)" -"((config104_0) config_0)" -"((temp105_0)" +"(let-values(((in104_0) in_0)" +"((config105_0) config_0)" +"((temp106_0)" " \"expected a non-empty sequence of alphanumeric, `-`, `+`, `_`, or `/` after `~a~a`\")" -"((extend-str106_0) extend-str_0)" -" ((temp107_0) (if one-space?_0 \" \" \"\")))" +"((extend-str107_0) extend-str_0)" +" ((temp108_0) (if one-space?_0 \" \" \"\")))" "(reader-error.1" " unsafe-undefined" " '#\\x" " #f" " unsafe-undefined" -" in103_0" -" config104_0" -" temp105_0" -"(list extend-str106_0 temp107_0))))" +" in104_0" +" config105_0" +" temp106_0" +"(list extend-str107_0 temp108_0))))" "(void))" "(values))))" "(let-values((()" "(begin" "(if(char=? '#\\/(string-ref lang-str_0 0))" "(let-values()" -"(let-values(((in108_0) in_0)" -"((config109_0) config_0)" -"((temp110_0)" +"(let-values(((in109_0) in_0)" +"((config110_0) config_0)" +"((temp111_0)" " \"expected a name that does not start `/` after `~a`\")" -"((extend-str111_0) extend-str_0))" +"((extend-str112_0) extend-str_0))" "(reader-error.1" " unsafe-undefined" " '#\\x" " #f" " unsafe-undefined" -" in108_0" -" config109_0" -" temp110_0" -"(list extend-str111_0))))" +" in109_0" +" config110_0" +" temp111_0" +"(list extend-str112_0))))" "(void))" "(values))))" "(let-values((()" @@ -61136,20 +61140,20 @@ static const char *startup_source = " '#\\/" "(string-ref lang-str_0(sub1(string-length lang-str_0))))" "(let-values()" -"(let-values(((in112_0) in_0)" -"((config113_0) config_0)" -"((temp114_0)" +"(let-values(((in113_0) in_0)" +"((config114_0) config_0)" +"((temp115_0)" " \"expected a name that does not end `/` after `~a`\")" -"((extend-str115_0) extend-str_0))" +"((extend-str116_0) extend-str_0))" "(reader-error.1" " unsafe-undefined" " '#\\x" " #f" " unsafe-undefined" -" in112_0" -" config113_0" -" temp114_0" -"(list extend-str115_0))))" +" in113_0" +" config114_0" +" temp115_0" +"(list extend-str116_0))))" "(void))" "(values))))" "(let-values(((submod-path_0)" @@ -61232,19 +61236,19 @@ static const char *startup_source = "(if(eqv? c_0(car wanted_1))" "(void)" "(let-values()" -"(let-values(((in118_0) in_0)" -"((config119_0) config_0)" -"((temp120_0)" -"(let-values(((accum-str122_0) accum-str_0)" -"((config123_0) config_0))" -"(accum-string-get!.1 0 accum-str122_0 config123_0)))" -"((c121_0) c_0))" -"(bad-syntax-error.1 c121_0 in118_0 config119_0 temp120_0))))" +"(let-values(((in119_0) in_0)" +"((config120_0) config_0)" +"((temp121_0)" +"(let-values(((accum-str123_0) accum-str_0)" +"((config124_0) config_0))" +"(accum-string-get!.1 0 accum-str123_0 config124_0)))" +"((c122_0) c_0))" +"(bad-syntax-error.1 c122_0 in119_0 config120_0 temp121_0))))" "(loop_0(cdr wanted_1))))))))))" " loop_0)" " wanted_0)" -"(let-values(((accum-str116_0) accum-str_0)((config117_0) config_0))" -"(accum-string-get!.1 0 accum-str116_0 config117_0)))))))" +"(let-values(((accum-str117_0) accum-str_0)((config118_0) config_0))" +"(accum-string-get!.1 0 accum-str117_0 config118_0)))))))" "(define-values" "(read-extension.1)" "(lambda(get-info?30_0" @@ -61267,8 +61271,8 @@ static const char *startup_source = "((read-config-coerce config_0)" " #t" " mod-path-datum_0" -"(let-values(((in124_0) in_0)((config125_0) config_0))" -"(port+config->srcloc.1 #f in124_0 config125_0)))" +"(let-values(((in125_0) in_0)((config126_0) config_0))" +"(port+config->srcloc.1 #f in125_0 config126_0)))" " mod-path-wrapped29_0)))" "(let-values(((get-info?_0) get-info?30_0))" "(let-values(((who_0) who31_0))" diff --git a/racket/src/cs/schemified/expander.scm b/racket/src/cs/schemified/expander.scm index 842a9061cc..5602d18cd5 100644 --- a/racket/src/cs/schemified/expander.scm +++ b/racket/src/cs/schemified/expander.scm @@ -71354,16 +71354,21 @@ (check-parameter 1/read-accept-lang config26_0) #f) (void) - (let ((temp85_0 "`~a` not enabled")) - (reader-error.1 - unsafe-undefined - '#\x78 - #f - unsafe-undefined - in25_0 - config26_0 - temp85_0 - (list extend-str23_0)))) + (let ((temp85_0 "`~a` not enabled\n possible reason: ~a")) + (let ((temp87_0 + (string-append + "not allowed again inside a module that already starts `#lang`," + " or not enabled for interactive evaluation"))) + (let ((temp85_1 temp85_0)) + (reader-error.1 + unsafe-undefined + '#\x78 + #f + unsafe-undefined + in25_0 + config26_0 + temp85_1 + (list extend-str23_0 temp87_0)))))) (call-with-values (lambda () (port-next-location in25_0)) (case-lambda @@ -71405,7 +71410,7 @@ (read-config/inner-source (read-config/outer-inner config26_0))) (void)) - (let ((temp90_0 + (let ((temp91_0 "found non-character while reading `#~a`")) (reader-error.1 unsafe-undefined @@ -71414,7 +71419,7 @@ unsafe-undefined in25_0 config26_0 - temp90_0 + temp91_0 (list extend-str23_0)))) (if (if (char-whitespace? c_0) (positive? @@ -71424,7 +71429,7 @@ (if (if one-space?16_0 (char=? c_0 '#\x20) #f) - (let ((temp94_0 + (let ((temp95_0 "expected a single space after `~a`")) (reader-error.1 unsafe-undefined @@ -71433,7 +71438,7 @@ unsafe-undefined in25_0 config26_0 - temp94_0 + temp95_0 (list extend-str23_0))) (if (let ((or-part_0 (char-lang-nonsep? c_0))) @@ -71446,7 +71451,7 @@ (loop_0)) (begin (begin (read-char in25_0) (void)) - (let ((temp98_0 + (let ((temp99_0 (string-append "expected only alphanumeric, `-`, `+`, `_`, or `/`" " characters for `~a`, found `~a`"))) @@ -71457,7 +71462,7 @@ unsafe-undefined in25_0 config26_0 - temp98_0 + temp99_0 (list extend-str23_0 c_0))))))))))))))) @@ -71466,10 +71471,10 @@ (accum-string-get!.1 0 accum-str_0 config26_0))) (begin (if (equal? lang-str_0 "") - (let ((temp105_0 + (let ((temp106_0 "expected a non-empty sequence of alphanumeric, `-`, `+`, `_`, or `/` after `~a~a`")) - (let ((temp107_0 (if one-space?16_0 " " ""))) - (let ((temp105_1 temp105_0)) + (let ((temp108_0 (if one-space?16_0 " " ""))) + (let ((temp106_1 temp106_0)) (reader-error.1 unsafe-undefined '#\x78 @@ -71477,12 +71482,12 @@ unsafe-undefined in25_0 config26_0 - temp105_1 - (list extend-str23_0 temp107_0))))) + temp106_1 + (list extend-str23_0 temp108_0))))) (void)) (begin (if (char=? '#\x2f (string-ref lang-str_0 0)) - (let ((temp110_0 + (let ((temp111_0 "expected a name that does not start `/` after `~a`")) (reader-error.1 unsafe-undefined @@ -71491,7 +71496,7 @@ unsafe-undefined in25_0 config26_0 - temp110_0 + temp111_0 (list extend-str23_0))) (void)) (begin @@ -71500,7 +71505,7 @@ (string-ref lang-str_0 (sub1 (string-length lang-str_0)))) - (let ((temp114_0 + (let ((temp115_0 "expected a name that does not end `/` after `~a`")) (reader-error.1 unsafe-undefined @@ -71509,7 +71514,7 @@ unsafe-undefined in25_0 config26_0 - temp114_0 + temp115_0 (list extend-str23_0))) (void)) (let ((submod-path_0 @@ -71592,9 +71597,9 @@ (void)) (if (eqv? c_0 (car wanted_1)) (void) - (let ((temp120_0 + (let ((temp121_0 (accum-string-get!.1 0 accum-str_0 config_0))) - (bad-syntax-error.1 c_0 in_0 config_0 temp120_0))) + (bad-syntax-error.1 c_0 in_0 config_0 temp121_0))) (loop_0 (cdr wanted_1)))))))))) (loop_0 wanted_0)) (accum-string-get!.1 0 accum-str_0 config_0))))) diff --git a/racket/src/expander/read/extension.rkt b/racket/src/expander/read/extension.rkt index 58c2162c95..5f74f3de94 100644 --- a/racket/src/expander/read/extension.rkt +++ b/racket/src/expander/read/extension.rkt @@ -75,8 +75,11 @@ (unless (and (check-parameter read-accept-reader config) (check-parameter read-accept-lang config)) (reader-error in config - "`~a` not enabled" - extend-str)) + "`~a` not enabled\n possible reason: ~a" + extend-str + (string-append + "not allowed again inside a module that already starts `#lang`," + " or not enabled for interactive evaluation"))) (define-values (line col pos) (port-next-location in))