[racket] rename-transformer-target, prop:rename-transformer, and contracts
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)
(rename-transformer-target
(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