guile-user
[Top][All Lists]
Advanced

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

Re: Write a macro which defines a procedure


From: Ricardo Wurmus
Subject: Re: Write a macro which defines a procedure
Date: Sat, 20 Jul 2019 22:37:38 +0200
User-agent: mu4e 1.2.0; emacs 26.2

Hi Zelphir,

> This was I found out about an issue, but not sure how to solve it. It
> seems like `module-define!` wants to have a symbol as input. But I
> could not figure out how to create a symbol from an identifier.
>
> Here is my updated version of the macro:
[…]
> (define-syntax define-api-route
>   (syntax-rules ()
>     [(define-api-route route http-method my-content-type)
>      (module-define! (current-module)
>                      ;; `route` should be `/container/json` for example.
>                      #{route}#

Use (quote route) instead.

-- 
Ricardo




reply via email to

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