Prevent -let-internal name from leaking to users

Because -let-internal wasn't rename-out'd, users would see its name in
syntax error messages. Adding #:context forces the error messages to be
phrased in terms of the given form.
This commit is contained in:
Brian Lachance 2015-07-24 11:01:07 -04:00 committed by Asumu Takikawa
parent 0a7ec21df9
commit 1e5bc30b95
2 changed files with 5 additions and 0 deletions

View File

@ -201,6 +201,7 @@ the typed racket language.
(let ([mk (lambda (form)
(lambda (stx)
(syntax-parse stx
#:context form
[(_ (bs:optionally-annotated-binding ...) . body)
(quasisyntax/loc stx (#,form (bs.binding ...) . body))])))])
(values (mk #'let) (mk #'let*) (mk #'letrec))))

View File

@ -0,0 +1,4 @@
#;
(exn-pred exn:fail:syntax? #rx"let: expected identifier")
#lang typed/racket
(let ([() 5]) (void))