[racket] rename-transformer-target, prop:rename-transformer, and contracts

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Aug 11 01:21:45 EDT 2014

Yes, that's a bug, and I'll push a repair soon.

Here's an even smaller program that demonstrates the same bug, which is
that `rename-transformer-target` doesn't work right on a chaperone of a
structure when the structure type's `prop:rename-transformer` value is
an integer.

 #lang racket/base

 (struct foo (id)
         #:property prop:rename-transformer 0)

  (chaperone-struct (foo #'x) foo-id (lambda (f x) x)))

At Sun, 10 Aug 2014 17:19:37 -0400, "Alexander D. Knauth" wrote:
> If I have this program:
> #lang racket/base
> (module foo racket/base
>   (require racket/contract/base)
>   (struct foo (id) #:transparent
>     #:property prop:rename-transformer (struct-field-index id))
>   (provide (contract-out
>             [struct foo ([id identifier?])])))
> (require 'foo)
> (define id #'x)
> (rename-transformer-target (foo id))
> Then it will return this:
> #<syntax ?>
> Instead of returning id.  
> Is this a bug?
> Why wouldn’t this work?
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.