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 type to apply: #<syntax-transformer rule> [...]
See my previous reply, and also are you sure that 'eval' is appropriate here? Would datum->syntax + read tricks work instead?
For an example in the wild, see e.g. <https://git.gnunet.org/gnunet-scheme.git/tree/gnu/gnunet/message/protocols.scm>.
(the (include-from-path "gnu/.../protocols.scmgen" is not relevant here, you could inline protocols.scmgen in that example -- I just found separating it in a separate file a nicer structure).
Greetings, Maxime.
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature