<div dir="ltr">Oh, now I get what you meant in your original message. Right. <div><br>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 9, 2013 at 3:29 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">I haven't found a way to make it happen yet. But even so, it seems<br>
like the wrong name.<br>
<span class="HOEnZb"><font color="#888888"><br>
Sam<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Dec 9, 2013 at 4:16 PM, Robby Findler<br>
<<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>> wrote:<br>
> Is it possible that that name can leak out in an error message?<br>
><br>
> Robby<br>
><br>
><br>
><br>
> On Mon, Dec 9, 2013 at 3:10 PM, Sam Tobin-Hochstadt <<a href="mailto:samth@cs.indiana.edu">samth@cs.indiana.edu</a>><br>
> wrote:<br>
>><br>
>> 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>
><br>
><br>
</div></div></blockquote></div><br></div>