public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* R7RS Libraries and Java interaction
@ 2017-03-22 20:55 Peter Lane
  2017-03-22 21:15 ` Per Bothner
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Lane @ 2017-03-22 20:55 UTC (permalink / raw)
  To: kawa

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-22 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22 20:55 R7RS Libraries and Java interaction Peter Lane
2017-03-22 21:15 ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).