Re: Bug report

Emmanuel Medernach <[email protected]> Wed, 19 Jan 2011 08:50:45 +0100
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
Hello,

[email protected] a écrit :
> It works fine in MzScheme v4.1.4, Ikarus 0.0.3, Ypsilon 0.9.6-update3,
> and in Larceny's R6RS and ERR5RS modes, but Larceny's R5RS mode
> accepts your definition of foo while rejecting your use:
> 
>> (foo (1 2 3) (4 5))
> ERROR detected during macro expansion:
> Use of macro is not consistent with definition
> (#((v) b 1) #((v) a 1))
> ((4 5) (1 2 3))
> 

I am not familiar with Larceny, what this error message means and what does it 
expects ? I tried with same length out of curiosiy but got this error:

 > (foo (1 2 3) (4 5 6))


Error: cdr: () is not a pair.


> The point of that peculiar error message is that meta-variable
> a and b get bound to lists of different lengths.  That may be
> a bug in Larceny's R5RS macro expander, but the R5RS discussion
> of this is too vague to tell for sure.
> 
> On this point, it appears that the R6RS is even vaguer than the
> R5RS; in practice, the semantics of R6RS macro expansion is
> defined by the macro expanders of R6RS-compatible systems.  All
> four of those macro expanders seem to accept your foo macro and
> your (foo (1 2 3) (4 5)) example.
> 

Thanks for explanations, so I hit a dark corner of macro expansion.

Best regards,
--
medernac.vcf (text/x-vcard, 259 B)
begin:vcard
fn:Emmanuel Medernach
n:Medernach;Emmanuel
org:IN2P3/CNRS ;63177 AUBIERE CEDEX
adr:;;;Clermont-Ferrand;;63000;France
email;internet:[email protected]
title:Laboratoire de Physique Corpusculaire
x-mozilla-html:FALSE
version:2.1
end:vcard