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: Felix
Subject: Re: [Chicken-hackers] [PATCH] warn if binding to keyword
Date: Mon, 24 Oct 2011 11:15:46 +0200 (CEST)

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]