[racket] Typed racket and keywords

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Thu Feb 21 17:56:35 EST 2013

On Thu, Feb 21, 2013 at 5:47 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> On Thu, Feb 21, 2013 at 5:28 PM, Norman Gray <norman at astro.gla.ac.uk> wrote:
>>
>>
>> But I'm now quite securely stuck, I think.
>>
>> ----
>>
>> In case anyone is curious (and in case the clear and obvious solution is indeed clear and obvious), what I'm trying to do is produce a typed version of the procedure below:
>
> I think the following example shows the way to implementing what
> you're looking for.
>
> https://gist.github.com/samth/5009113

Thinking about it further, it's possible to enforce this invariant
statically.  Unfortunately TR isn't smart enough to let you express
this in the nicest way possible, but if you look at the above gist
now, it shows an example of the type system rejecting the errors that
you're catching dynamically.

Sam

Posted on the users mailing list.