This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Loading macros from java
- From: Jim White <jim at pagesmiths dot com>
- To: Andy Dwelly <andy dot dwelly at safedataco dot com>
- Cc: kawa at sourceware dot org
- Date: Thu, 22 Jun 2006 11:59:54 -0700
- Subject: Re: Loading macros from java
- References: <449ABABF.50905@safedataco.com>
Andy Dwelly wrote:
> ...
> Is this a bug or am I doing something stupid ? is there a workaround ?
> The actual prequel file will probably end up quite large so its not
> really practical to write out a set of strings from Java.
>
> Just out of curiosity I also tried:
>
> Object x = scm.eval("(define-syntax iflte (syntax-rules () ((iflte a b c
> d) (if (<= a b) c d)))) (iflte 10 10 (+ 3 4) (/ 10 0))");
> ...
I believe the problem is you're not setting your environment, so each
expression is evaluated in a separate one.
http://www.gnu.org/software/kawa/Evaluating-Scheme-expressions-from-Java.html
Jim