This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Using Kawa extensions in R7RS libraries
- From: ElÃas Alonso G.-Cornejo <eliasagc at gmail dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: kawa mailing list <kawa at sourceware dot org>
- Date: Mon, 6 Jul 2015 09:29:20 +0200
- Subject: Re: Using Kawa extensions in R7RS libraries
- Authentication-results: sourceware.org; auth=none
- References: <m28ug38opn dot fsf at gmail dot com> <54DCE968 dot 7000800 at bothner dot com> <m2d25aaoj7 dot fsf at gmail dot com> <54E2DE69 dot 2060708 at bothner dot com> <851CA162-87C3-4161-BD7D-338E6AC34FEC at theptrgroup dot com> <552B70EC dot 8040608 at bothner dot com> <CANfjrNW0FFmM3Xp5gX+BNqAbq2Y=C2OiuHYEXv50Y09r9NWipA at mail dot gmail dot com> <559958AE dot 2060101 at bothner dot com>
The patch works correctly but raises another issue: (future ...) and
(runnable ...) are not included in (kawa base). I don't know if they
should be included, but if I require kawa/lib/thread.scm with (import
thread), any attempt to call (future ...) will show the following
message:
warning - no declaration seen for lambda
And fail. I fixed it by adding (import (scheme base)) at the top of
kawa/lib/thread.scm but I'm not sure if that's the best way to do it.
> The object macro is implemented by the Java code kawa/standard/object.java.
> (You can see this by searching for "object" in kawa/standard/Scheme.java.)
Thanks, I appreciate the directions. I've tried to read kawa's source
code before, but didn't know where to begin. kawa/standard/Scheme.java
looks like a good starting point :)
2015-07-05 18:17 GMT+02:00 Per Bothner <per@bothner.com>:
>
>
> On 07/05/2015 12:31 AM, ElÃas Alonso G.-Cornejo wrote:
>>
>> I've been having some trouble using
>>
>> (object ...)
>>
>> to create anonymous classes inside
>>
>> (define-library ...)
>>
>> declarations. I've added (import (kawa base)), but Kawa tries to
>> instantiate java.lang.Object instead of creating the anonymous class.
>> Where is the (object ...) macro defined? I've looking in lib/kawa,
>> but can't find it.
>
>
> The object macro is implemented by the Java code kawa/standard/object.java.
> (You can see this by searching for "object" in kawa/standard/Scheme.java.)
>
> It looks like 'object' is missing in (kawa base). Please try the
> attached patch and let me know if that fixes the issue.
>
> We need to systematically go through the kawa extensions and add
> them to (kawa base). (We should also re-do the bindings in Scheme.java
> to use (kawa base) rather than duplicate it.)
>
> --
> --Per Bothner
> per@bothner.com http://per.bothner.com/