[racket-dev] extracting constructor names from static struct info

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Tue Jun 22 13:14:44 EDT 2010

Using the `struct' form produces static struct info whose constructor
name is a macro transformer that expands to an inner, hidden, name.
Currently, there's no way to access this name, which tools such as
Typed Racket might want to do.

There's two ways to implement this that I can see:

1. Add a `struct-info-constructor' export from `racket/struct-info',
which conditionalizes on the type of the struct info, and accesses
2. Add a `prop:constructor-name' property, which the various struct
info structures implement (and probably an accessor function which
uses this, and handles lists as well).

Does anyone have an opinion as to which would be better, or any other
thoughts on the subject?
sam th
samth at ccs.neu.edu

Posted on the dev mailing list.