chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] warn if binding to keyword


From: Thomas Bushnell, BSG
Subject: Re: [Chicken-hackers] [PATCH] warn if binding to keyword
Date: Mon, 24 Oct 2011 09:16:14 -0700

Isn't that a bug? It should get the local value unconditionally unless you wrap it with rename.

Thomas

On Mon, Oct 24, 2011 at 2:15 AM, Felix <address@hidden> wrote:
From: "Thomas Bushnell, BSG" <address@hidden>
Subject: Re: [Chicken-hackers] [PATCH] warn if binding to keyword
Date: Sat, 22 Oct 2011 19:41:38 -0700

> Given the hygiene rules, how could it be a nasty bug that's hard to find?
> Can you give an example?

I had this particular case:

(define-syntax define-typed-record
 (er-macro-transformer
   (lambda (x r c)
     (let (... (%: (r ':)) ...)
       ...
       `(,%: ...)))))

The reference to the identifier "%:" (which is a keyword) will return
the keyword itself, and not the result of "(r ':)". There is no error,
and the expansion will contain an incorrect value.


cheers,
felix


reply via email to

[Prev in Thread] Current Thread [Next in Thread]