This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Missing feature or just differences with Guile for define-public
- From: Per Bothner <per at bothner dot com>
- To: scprotz <scprotz at gmail dot com>, kawa at sourceware dot org
- Date: Sat, 28 Jan 2017 15:07:53 -0800
- Subject: Re: Missing feature or just differences with Guile for define-public
- Authentication-results: sourceware.org; auth=none
- References: <CAB3sfF8ygEmP5BsCNf7Q-zExYqKhBWY9UyhWDP1hCzEDSNWhjA@mail.gmail.com>
On 01/28/2017 04:40 AM, scprotz wrote:
I was trying to compile the scm files that come with Aisleriot using
Kawa (these are intended for use with Guile, but I was hoping to try
them out in Java). Many seem to compile ok, but one of the core
files, api.scm has problems.
I came across two issues when trying to convert api.scm to .class.
The first was "invalid use of '_". Apparently kawa doesn't like the _
as part of define's. Easy enough to fix just by changing the '_ to
another identifier.
The second issue though was I get "improper list (circular or dotted)
is not allowed here.
Here is an example define-public from the file:
(define-public (set-features . feature-list)
(set-feature-word! (+ (get-feature-word)
(apply + feature-list))))
My scheme-fu is very very weak, so I'm not sure if this is just an
implementation difference, a bug, or my misunderstanding.
This problem is because Kawa does not define define-public,
so Kawa thinks it is a function call. And an quoted dotted
list is not valid in an expression.
Kawa has a different module system that Guile.
Specifically, it does not define define-module,
use-module, or define-public.
It might be possible to define Kawa implementations for
the Guile module system on top of the Kawa module system,
though there would probably be some incompatibilities.
It seems like Aisleriot depends on lots of native code,
including calls to Gnome. So getting anything working will be
a major porting effort.
--
--Per Bothner
per@bothner.com http://per.bothner.com/