[racket] TRing Places Issue Resolved

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Wed Nov 7 11:59:40 EST 2012

On Wed, Nov 7, 2012 at 11:55 AM, Ray Racine <ray.racine at gmail.com> wrote:
> As clearly explained in the Racket Doc for 'place', given (place ch body0
> ...) the bodies are lifted to the module top level. As generated binding,
> lift.0 is lifted to the top level there is no Type declaration for TR to
> see, so the single 'ch' arg of the lifted wrapping lambda is of type Any.
> Hence, the necessity of the added (when (place? ch) ...).

The better way to fix this would be to annotate `ch` with the type
`Place`, like this:

(place #{ch : Place} ...)

Annotating binding positions in macros like this is why the #{} syntax exists.
sam th
samth at ccs.neu.edu

Posted on the users mailing list.