This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Macro expansion problem
On May 20, 2009, at 9:21 AM, Felix Klock wrote:
It looks to me like Kawa's behavior with respect to the literals
list is not consistent with the behavior of Larceny nor PLT.
Here's an example straight from the R5RS (from the end of Section
4.3.2, "Pattern language"), that should make this clearer:
(let ((=> #f))
(cond (#t => 'ok))) ===> ok
In particular, the rebinding of => in the let expression means that
the occurrence of => above should *not* be matched as a literal by the
cond special form.
Kawa is not properly handling this case (according to the R5RS).
% /usr/local/bin/larceny
Larceny v0.963 "Fluoridation" (Jul 29 2008 20:26:38, precise:Posix
Unix:unified)
/home/pnkfelix/.larceny: adding (lib/Experimental lib/Contrib) to
require path
larceny.heap, built on Tue Jul 29 20:28:40 EDT 2008
> (let ((=> #f)) (cond (#t => 'ok)))
ok
> (exit)
% /Applications/PLT\ Scheme\ v4.1.5/bin/mzscheme
Welcome to MzScheme v4.1.5 [3m], Copyright (c) 2004-2009 PLT Scheme Inc.
> (let ((=> #f)) (cond (#t => 'ok)))
ok
> (exit)
% java -jar kawa-1.9.1.jar
#|kawa:1|# (let ((=> #f)) (cond (#t => 'ok)))
Argument (ok) to 'apply-to-args' has wrong type (java.lang.String)
(expected: procedure)
at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:227)
at gnu.mapping.Procedure.apply(Procedure.java:103)
at gnu.mapping.Procedure.apply(Procedure.java:95)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:296)
at kawa.Shell.run(Shell.java:230)
at kawa.Shell.run(Shell.java:172)
at kawa.Shell.run(Shell.java:159)
at kawa.repl.main(repl.java:844)
#|kawa:2|# (exit)
%