This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: define-simple-class vs modules


* Jamison Hope [2011-02-03 02:51] writes:

> On Jan 26, 2011, at 7:22 PM, Per Bothner wrote:
>
>> On 01/26/2011 01:08 PM, Jamison Hope wrote:
>>> New question: is there any sort of reflection mechanism which will
>>> give
>>> me a list of all the bindings exported by a module?
>>> java.lang.Class#getFields is kind of on the right track, except
>>> that it
>>> gives me mangled names, gives me everything even if it was
>>> define-private or not listed in module-export and includes the extra
>>> Kawa runtime support stuff inserted by the compiler.
>>
>> No, there isn't but perhaps there should be.
>>
>> Maybe something based on R6RS's (rnrs records inspection) library?
>
> I looked over (rnrs records inspection), and I'm not sure how applicable
> it is, given the differences between (rnrs records) and Java classes.

The environment function from R6RS seems like a good starting point for
this kind of thing.  E.g.  (environment '(rnrs base)) should return an
environment object.  Maybe the (rnrs records inspection) can then be
used to inspect the environment object, but a more direct API for
environments would be preferable.

Helmut


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]