<div dir="ltr">Is it possible that that name can leak out in an error message?<div><br></div><div>Robby</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 9, 2013 at 3:10 PM, Sam Tobin-Hochstadt <span dir="ltr"><<a href="mailto:samth@cs.indiana.edu" target="_blank">samth@cs.indiana.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Currently, this program fails with a somewhat bizarre type error:<br>
<br>
    #lang typed/racket<br>
<br>
    (: foo ([#:k Any] -> Integer))<br>
    (define (foo #:k [s #f]) 0)<br>
<br>
    (let: ([i : Integer (foo #:k #t)]) i)<br>
<br>
The reason is that the expansion of keyword applications generates a<br>
name to use for the function (here `foo`), and it uses<br>
`syntax-local-infer-name` to get the name to use. Unfortunately, in<br>
this case, it produces `i`, an identifier which has an extra syntax<br>
property saying that `i` is an `Integer`.  Of course, `foo` isn't an<br>
integer, it's a function, and so we get a type error.<br>
<br>
I don't see why the inferred name is the right choice here -- there's<br>
no connection between `i` and the name of the function. I can just<br>
change this to use a fresh name, but I thought I'd ask first.<br>
<br>
Sam<br>
_________________________<br>
  Racket Developers list:<br>
  <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
</blockquote></div><br></div>