guile-devel
[Top][All Lists]
Advanced

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

Re: unhandled constant?


From: Han-Wen Nienhuys
Subject: Re: unhandled constant?
Date: Fri, 31 Jan 2020 16:16:46 +0100

On Fri, Jan 31, 2020 at 3:58 PM Linus Björnstam
<address@hidden> wrote:
>
> Guile1.8's macros are run-time macros: they are executed directly and not 
> transformed to output code that is then compiled. That is the reason why your 
> code works: to newer guiles the (inner ...) is only available at expansion 
> time. The macro output is trying to call code that does not exist at runtime!
>
> For this to be working code the (inner ...) function needs to be available in 
> the macro expansion. I didn't read through exactly what you are trying to do, 
> but try outputting a let:
>
> `(let ((inner (lambda (n v) (set ! ...))))
>   (inner ,name ,value))
>
> I doubt you can make the old code work in newer guiles, since I doubt any 
> scheme is a s lax about expansion time and macro time separation.

Thanks for the explanation. This makes sense.

Is it possible to attach doc strings to (define-syntax .. )
declarations, and if so, where do they go?

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen



reply via email to

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