This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: define-syntax, let loop and typed arguments (using :: in typedeclaration)
- From: Per Bothner <per at bothner dot com>
- To: Vladimir Tsichevski <wowa at jet dot msk dot su>
- Cc: Kawa List <kawa at sources dot redhat dot com>
- Date: Mon, 21 Apr 2003 23:10:54 -0700
- Subject: Re: define-syntax, let loop and typed arguments (using :: in typedeclaration)
- References: <3E969BAA.3040904@jet.msk.su>
Vladimir Tsichevski wrote:
using typed argument with :: may cause trouble in define-syntax
declarations:
A clean fix for this is non-trivial. The problem is that the '::'
in the macro gets renamed to a Symbol (to handle macro "hygiene").
When this get matched against the macros implementing 'let',
we should use the 'matches' method of Translator. Unfortunately,
we instead use the 'match' method of EqualPat, which does not
know anything about Translator. Fixing this woudl require
changing the Pattern hierarchy and make them tied to Translator,
which would be unfortunate.
I think it would be desirable to re-write how syntax-rules patterns
are compiled. Probably, it should use some kind of compact bytecode,
like we use for templates. I don't have time for it. (It should be
a simple beginner's project.)
Instead, I checked in a special-case kludge in EqualPat.
--
--Per Bothner
per at bothner dot com http://per.bothner.com/