This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
R7RS Libraries and Java interaction
- From: Peter Lane <peter at peterlane dot info>
- To: kawa at sourceware dot org
- Date: Wed, 22 Mar 2017 20:55:35 +0000
- Subject: R7RS Libraries and Java interaction
- Authentication-results: sourceware.org; auth=none
Hi,
Is it possible to make an R7RS library recognise Java interaction when
compiled?
e.g. if I try compiling the following:
(define-library (java)
(export get-num)
(import (scheme base))
(begin
(define (get-num) ((String "hello"):length))
))
$ kawa --r7rs -C java.sld(compiling java.sld to java)
java.sld:7:54: warning - no declaration seen for :length
$ kawa --r7rs try-java.sps java.sld:7:54: unbound location: :length
at gnu.mapping.SharedLocation.get(SharedLocation.java:22)
at gnu.mapping.DynamicLocation.get(DynamicLocation.java:28)
at java.getNum(java.sld:7)
If I rewrite get-num to use invoke, I still get compilation warnings,
but it works at runtime.
If the answer's no, that's ok: I think Kawa's modules will interact all
right with my other code. I'm just partial to the R7RS form.
thanks for any suggestions
Peter.
--
Peter Lane
http://peterlane.info/scheme.html