From f41b180b48609fa6937cdb7504d2713af41c3798 Mon Sep 17 00:00:00 2001 From: Sorawee Porncharoenwase Date: Wed, 6 Jan 2021 07:27:13 -0800 Subject: [PATCH] fix typos in datum->syntax error message --- racket/src/bc/src/startup.inc | 22 ++++++++++++---------- racket/src/cs/schemified/expander.scm | 20 ++++++++++---------- racket/src/expander/README.txt | 2 +- racket/src/expander/syntax/api.rkt | 20 ++++++++++---------- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/racket/src/bc/src/startup.inc b/racket/src/bc/src/startup.inc index 6aa9f1037a..96d23c919f 100644 --- a/racket/src/bc/src/startup.inc +++ b/racket/src/bc/src/startup.inc @@ -48493,7 +48493,8 @@ static const char *startup_source = "(if(let-values(((or-part_0)(not stx-c_0)))" "(if or-part_0 or-part_0(syntax?$1 stx-c_0)))" "(void)" -" (let-values () (raise-argument-error 'datum->syntax \"(or #f syntax?)\" stx-c_0)))" +"(let-values()" +" (raise-argument-error 'datum->syntax \"(or/c #f syntax?)\" stx-c_0)))" "(if(let-values(((or-part_0)(not stx-l_0)))" "(if or-part_0" " or-part_0" @@ -48504,22 +48505,23 @@ static const char *startup_source = "(raise-argument-error" " 'datum->syntax" "(string-append" -" \"(or #f syntax?\\n\"" -" \" (list/c any/c\\n\"" -" \" (or/c exact-positive-integer? #f)\\n\"" -" \" (or/c exact-nonnegative-integer? #f)\\n\"" -" \" (or/c exact-positive-integer? #f)\\n\"" -" \" (or/c exact-nonnegative-integer? #f))\\n\"" -" \" (vector/c any/c\\n\"" +" \"(or/c #f syntax?\\n\"" +" \" (list/c any/c\\n\"" " \" (or/c exact-positive-integer? #f)\\n\"" " \" (or/c exact-nonnegative-integer? #f)\\n\"" " \" (or/c exact-positive-integer? #f)\\n\"" -" \" (or/c exact-nonnegative-integer? #f)))\")" +" \" (or/c exact-nonnegative-integer? #f))\\n\"" +" \" (vector/c any/c\\n\"" +" \" (or/c exact-positive-integer? #f)\\n\"" +" \" (or/c exact-nonnegative-integer? #f)\\n\"" +" \" (or/c exact-positive-integer? #f)\\n\"" +" \" (or/c exact-nonnegative-integer? #f)))\")" " stx-l_0)))" "(if(let-values(((or-part_0)(not stx-p_0)))" "(if or-part_0 or-part_0(syntax?$1 stx-p_0)))" "(void)" -" (let-values () (raise-argument-error 'datum->syntax \"(or #f syntax?)\" stx-p_0)))" +"(let-values()" +" (raise-argument-error 'datum->syntax \"(or/c #f syntax?)\" stx-p_0)))" "(datum->syntax$1 stx-c_0 s_0(to-srcloc-stx stx-l_0) stx-p_0))))))))))))))" "(case-lambda" "((stx-c_0 s_0)(begin 'datum->syntax(datum->syntax_0 stx-c_0 s_0 #f #f #f)))" diff --git a/racket/src/cs/schemified/expander.scm b/racket/src/cs/schemified/expander.scm index d0408c1d34..10f32dcb56 100644 --- a/racket/src/cs/schemified/expander.scm +++ b/racket/src/cs/schemified/expander.scm @@ -54734,7 +54734,7 @@ (void) (raise-argument-error 'datum->syntax - "(or #f syntax?)" + "(or/c #f syntax?)" stx-c4_0)) (if (let ((or-part_0 (not stx-l1_0))) (if or-part_0 @@ -54747,24 +54747,24 @@ (raise-argument-error 'datum->syntax (string-append - "(or #f syntax?\n" - " (list/c any/c\n" - " (or/c exact-positive-integer? #f)\n" - " (or/c exact-nonnegative-integer? #f)\n" - " (or/c exact-positive-integer? #f)\n" - " (or/c exact-nonnegative-integer? #f))\n" - " (vector/c any/c\n" + "(or/c #f syntax?\n" + " (list/c any/c\n" " (or/c exact-positive-integer? #f)\n" " (or/c exact-nonnegative-integer? #f)\n" " (or/c exact-positive-integer? #f)\n" - " (or/c exact-nonnegative-integer? #f)))") + " (or/c exact-nonnegative-integer? #f))\n" + " (vector/c any/c\n" + " (or/c exact-positive-integer? #f)\n" + " (or/c exact-nonnegative-integer? #f)\n" + " (or/c exact-positive-integer? #f)\n" + " (or/c exact-nonnegative-integer? #f)))") stx-l1_0)) (if (let ((or-part_0 (not stx-p2_0))) (if or-part_0 or-part_0 (syntax?$1 stx-p2_0))) (void) (raise-argument-error 'datum->syntax - "(or #f syntax?)" + "(or/c #f syntax?)" stx-p2_0)) (datum->syntax$1 stx-c4_0 diff --git a/racket/src/expander/README.txt b/racket/src/expander/README.txt index 409df58f28..e326da2c09 100644 --- a/racket/src/expander/README.txt +++ b/racket/src/expander/README.txt @@ -139,7 +139,7 @@ makefile/preprocessor dance that generates the bytecode version of the expander itself. The `make` step for Racket BC generates source files in -"compiled/cache-src". In come cases (hopefully rare), you may have to +"compiled/cache-src". In some cases (hopefully rare), you may have to manually discard "compiled/cache-src" when things change. ---------------------------------------- diff --git a/racket/src/expander/syntax/api.rkt b/racket/src/expander/syntax/api.rkt index b1f1dd584b..45e1959ba1 100644 --- a/racket/src/expander/syntax/api.rkt +++ b/racket/src/expander/syntax/api.rkt @@ -79,25 +79,25 @@ (define/who (datum->syntax stx-c s [stx-l #f] [stx-p #f] [ignored #f]) (unless (or (not stx-c) (syntax? stx-c)) - (raise-argument-error who "(or #f syntax?)" stx-c)) + (raise-argument-error who "(or/c #f syntax?)" stx-c)) (unless (or (not stx-l) (syntax? stx-l) (encoded-srcloc? stx-l)) (raise-argument-error who - (string-append "(or #f syntax?\n" - " (list/c any/c\n" - " (or/c exact-positive-integer? #f)\n" - " (or/c exact-nonnegative-integer? #f)\n" - " (or/c exact-positive-integer? #f)\n" - " (or/c exact-nonnegative-integer? #f))\n" - " (vector/c any/c\n" + (string-append "(or/c #f syntax?\n" + " (list/c any/c\n" " (or/c exact-positive-integer? #f)\n" " (or/c exact-nonnegative-integer? #f)\n" " (or/c exact-positive-integer? #f)\n" - " (or/c exact-nonnegative-integer? #f)))") + " (or/c exact-nonnegative-integer? #f))\n" + " (vector/c any/c\n" + " (or/c exact-positive-integer? #f)\n" + " (or/c exact-nonnegative-integer? #f)\n" + " (or/c exact-positive-integer? #f)\n" + " (or/c exact-nonnegative-integer? #f)))") stx-l)) (unless (or (not stx-p) (syntax? stx-p)) - (raise-argument-error who "(or #f syntax?)" stx-p)) + (raise-argument-error who "(or/c #f syntax?)" stx-p)) (raw:datum->syntax stx-c s (to-srcloc-stx stx-l) stx-p)) (define/who (syntax-binding-set)