This is the mail archive of the kawa@sources.redhat.com 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: Portable Syntax Case


On Fri, 2004-04-23 at 22:39, Per Bothner wrote:
> Adam Warner wrote:
> 
> 
> > (sc-expand '(define-syntax and2 (lambda (x) (syntax-case x () ((_ x y) (syntax (if x y #f)))))))
> > 
> > Argument #0 to 'vector-ref' has wrong type
> 
> My guess is that it's using Kawa's interaction-environment
> unction rather than psyntax.pp's.
> 
> You could try running Kawa with --no-inline.

Great guess. This caused the error to change to a
java.lang.NullPointerException (version 6.9 gives the same error).

> However, at some point you'll want to integrate psyntax into Kawa,
> which probably require using Kawa's version of these functions.
> 
> The 6.9 version of psyntax.ss does not define interaction-environment,
> but the 6.9a version does.
> 
> I notice that the mzscheme manual documents a "general, mostly hygienic 
> macro system is based on syntax-case by Dybvig, Hieb, and Bruggeman",
> and it appears they use a different implementation.
> 
> I think trying to force-fit psyntax.pp or psyntax.ss into Kawa will
> be difficult, and the result may be slow.  Trying to fix the problems
> with the existing partial implementation of syntax-case may be more
> promising, at least in terms of getting something integrated into Kawa.
> Both appraches will be a non-trivial ...

Thank you for the advice. The mzscheme code looks quite promising (`It
implements, in a non-bootstrapping way, all of the MzScheme syntax and
"primitives" that are not implemented in the kernel.')

There is a licensing issue with the mzscheme implementation:
<http://www.plt-scheme.org/license/>. Incorporating the code could
require you to follow the terms of the LGPL without exception; in
particular you may no longer be able to grant the ability to use and
redistribute unmodified versions of Kawa without restriction. Let me
know if this is reason enough to consider other options.

Regards,
Adam


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