[racket] Structs and syntax-local-value ... how is the struct name overloaded?

From: Scott Klarenbach (scott at pointyhat.ca)
Date: Sun Jan 19 23:00:24 EST 2014

How is it that the definition of (struct my-name (x y)) can bind
*my-name*both as a #<procedure:my-name> at runtime and a
transformer-binding
*my-name* that at compile time (via syntax-local-value) produces
#<procedure:self-ctor-checked-struct-info>.?

Or, put another way, how can I define a transformer *my-fn* that produces
syntax, but that also exposes hidden meta-data under the same binding to
other macros that might wish to know about the binding at compile time?

I'm specifically wondering how the overloading works.  Is it some clever
use of prop:procedure?

Thanks.

-- 
Talk to you soon,

Scott Klarenbach

PointyHat Software Corp.
www.pointyhat.ca
p 604-568-4280
e scott at pointyhat.ca
200-1575 W. Georgia
Vancouver, BC V6G2V3

_______________________________________
To iterate is human; to recur, divine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140119/0e81f4e7/attachment.html>

Posted on the users mailing list.