Re: defining macros within eval

2022-10-19 Thread Maxime Devos
On 19-10-2022 10:42, Paul Jarc wrote: Maxime Devos wrote: For an example in the wild, see e.g. . Thanks (to Jean as well) for all the suggestions. Can you point me to an example of where include/sexp is used?

Re: defining macros within eval

2022-10-19 Thread Paul Jarc
Maxime Devos wrote: > For an example in the wild, see > e.g. > . Thanks (to Jean as well) for all the suggestions. Can you point me to an example of where include/sexp is used? To take a step back, my ultimate

Re: defining macros within eval

2022-10-16 Thread Maxime Devos
On 16-10-2022 16:07, Jean Abou Samra wrote: Is there some way to make this work?  In my real code, the expression is read from a file, where it might be a macro definition or anything else, and it's evaluated in a different module from the current one. You cannot byte-compile code in 

Re: defining macros within eval

2022-10-16 Thread Maxime Devos
On 16-10-2022 11:39, Paul Jarc wrote: Hi. I'm updating some old code to work with newer versions of Guile. This example used to work with 1.8, but gives an error with 2.2 and later: (begin (eval '(define-syntax-rule (rule x) x) (current-module)) (display (rule "ok\n"))) ERROR: Wrong

Re: defining macros within eval

2022-10-16 Thread Maxime Devos
On 16-10-2022 11:39, Paul Jarc wrote: Hi. I'm updating some old code to work with newer versions of Guile. This example used to work with 1.8, but gives an error with 2.2 and later: (begin (eval '(define-syntax-rule (rule x) x) (current-module)) (display (rule "ok\n"))) ERROR: Wrong

Re: defining macros within eval

2022-10-16 Thread Jean Abou Samra
Le 16/10/2022 à 11:39, Paul Jarc a écrit : Hi. I'm updating some old code to work with newer versions of Guile. This example used to work with 1.8, but gives an error with 2.2 and later: (begin (eval '(define-syntax-rule (rule x) x) (current-module)) (display (rule "ok\n"))) ERROR: