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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jun 25 09:49:32 EDT 2010

At Tue, 22 Jun 2010 13:14:44 -0400, Sam Tobin-Hochstadt wrote:
> 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
> appropriately.
> 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).

Isn't #1 the selector for #2? In other words, that looks like a list of
things to be added to the struct-info API, rather than a list of
options.



Posted on the dev mailing list.