This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Loading macros from java


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]