[Top][All Lists]

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

Re: [Chicken-users] miscmacros hygienic

From: felix winkelmann
Subject: Re: [Chicken-users] miscmacros hygienic
Date: Thu, 29 May 2008 09:38:03 +0200

On Thu, May 29, 2008 at 5:33 AM, Jim Ursetto <address@hidden> wrote:
> (import (only chicken
>              when unless handle-exceptions
>              let-optionals make-parameter))
> However adding this import line to miscmacros is basically useless (as far as 
> I
> can tell) because the macros are expanded in the caller's environment, so the
> caller is the one who needs to do the import from chicken.
> I'd like to know the proper way to handle this, if any.  Does the caller
> need to explicitly import any dependencies?

Unfortunately,yes (in the moment).

> Similarly, as while* actually expands into an invocation of if*, it does
> not work for the caller to do (import (only miscmacros while*)), as the
> if* in the resulting expansion of while* will be undefined.
> In fact the following doesn't look hygienic at all:
>  #;1> (module foo ()
>    (import scheme (only miscmacros while*))
>    (define-syntax if*
>      (lambda (f r c) (error 'bad)))
>    (while* (it (> 0 5)) (display it)))
>  Error: during expansion of (if*1305 ...) - bad
> Is this a bug or am I just confused?



reply via email to

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