public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Peter Lane <peter@peterlane.info>
To: kawa@sourceware.org
Subject: R7RS Libraries and Java interaction
Date: Wed, 22 Mar 2017 20:55:00 -0000	[thread overview]
Message-ID: <788f96d2-c723-f38b-077b-1b6040aa6a16@peterlane.info> (raw)

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

             reply	other threads:[~2017-03-22 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 20:55 Peter Lane [this message]
2017-03-22 21:15 ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=788f96d2-c723-f38b-077b-1b6040aa6a16@peterlane.info \
    --to=peter@peterlane.info \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).