> On Aug 16, 2018, at 15:35, David Storrs <david.sto...@gmail.com> > wrote: > > struct-id from (require syntax/parse/class/struct-id) has an > all-fields-visible? attribute. I've looked around and can't figure > out what would cause a field to not be visible. Can someone point me > to the relevant part of the FM?
Unfortunately, I’m not sure this is super well-documented. The most relevant section is the one entitled “Structure Type Transformer Binding”[1], which describes the pieces of information associated with a structure type at compile-time. However, it doesn’t really explain why certain fields might not be known. The only way all-fields-visible? can be #f, as far as I know (assuming you’re not doing anything weird with prop:struct-info), is if you use the #:super option of the struct form. This allows you to specify the supertype of a struct using a (runtime!) structure type descriptor, which may have been created directly using make-struct-type rather than using the struct form. Since this is a dynamic value that can be produced by an arbitrary expression, nothing can be known in this case about the supertype at compile-time. If you aren’t using the #:super option of the struct form, I don’t think all-fields-visible? should ever be #f. Alexis [1]: http://docs.racket-lang.org/reference/structinfo.html -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.