,
Zelphir
On 7/20/19 6:00 PM, guile-user-requ...@gnu.org wrote:
> Message: 2
> Date: Sat, 20 Jul 2019 09:04:56 +0200
> From: Arne Babenhauserheide
> To: guile-user@gnu.org
> Subject: Re: Write a macro which defines a procedure
> Message-ID: <87sgr1nq5d@web.de>
> Con
Hi Mark!
On 7/21/19 4:56 AM, Mark H Weaver wrote:
> Hi Zelphir,
>
> Zelphir Kaltstahl writes:
>
>> At first I had the macro use `define`, but then I thought: "What if I
>> want to conditionally define a route procedure?". My guess is, that then
>> the define form would be inside some `cond` or `i
Hi Zelphir,
Zelphir Kaltstahl writes:
> At first I had the macro use `define`, but then I thought: "What if I
> want to conditionally define a route procedure?". My guess is, that then
> the define form would be inside some `cond` or `if` form and then it
> would not work
You're right, it would
Ah thanks! Sometimes one does not see the simple solution. I was
thinking that it would have to be something complicated.
On 2019-07-20 22:37, Ricardo Wurmus wrote:
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 sy
Hi,
At first I had the macro use `define`, but then I thought: "What if I
want to conditionally define a route procedure?". My guess is, that then
the define form would be inside some `cond` or `if` form and then it
would not work (I did not check this assumption though, because my macro
did not w
Matt Wette writes:
> On 7/19/19 3:51 PM, zelphirkaltstahl wrote:
>> (module-define! (current-module)
>> ;; `route` should be `/container/json` for example.
>> route
>
> (quote route)
Yes, or equivalently: 'route
As an aside, is there a reason to not de
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-
Hey Ricardo,
Thanks for the advice! I did not remember, that I could use ,expand in
the Guile REPL.
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 ident
On 7/19/19 3:51 PM, zelphirkaltstahl wrote:
(module-define! (current-module)
;; `route` should be `/container/json` for example.
route
(quote route)
Hi,
> However, when I call this macro as follows:
>
>
> 88
> (define-api-route /container/json 'POST
> application/x-www-form-urlencoded)
> 88
>
> I get the following error:
>
> 88
zelphirkaltstahl writes:
> Hi Guile Users,
>
> I want to write a macro, which creates a procedure of given name,
> where the given name is a not yet defined identifier.
> Here is what I have so far:
…
> Anyway, can you help me out writing the macro, fixing at least the 2
> issues or direct me
Hi Guile Users,
I want to write a macro, which creates a procedure of given name, where
the given name is a not yet defined identifier.
Here is what I have so far:
88
(use-modules (web uri)
(web client)
(json)
(ice-9
12 matches
Mail list logo