[racket-dev] Trouble with state, submodules, and module-begin

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Tue Jul 3 11:15:49 EDT 2012

On Mon, Jul 2, 2012 at 9:22 AM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> Is it possible there is another channel that TR could use to
> communicate these types? That is, could it not expand
>   (: f Integer)
>   (define f 5)
> into something that bound 'f' to a macro that knows its type? I guess
> it already does that, so something doesn't work about that here, but
> I'm not seeing what it is.

Typed Racket doesn't do this -- `f` is bound to the same thing it
would be in Racket, and a separate side table at expansion time
maintains the type information, following the recipe Matthew
originally described in the "You Want it When?" paper.  I don't think
the `special binding` version would work, for a number of reasons
(full local-expansion, handling the base environment, expansion-time
sam th
samth at ccs.neu.edu

Posted on the dev mailing list.