unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Simon Streit <simon@netpanic.org>
Cc: guix-devel@gnu.org
Subject: Re: WSDD Service Module
Date: Mon, 24 Jan 2022 16:46:44 +0100	[thread overview]
Message-ID: <87ee4xrva3.fsf@gnu.org> (raw)
In-Reply-To: <ygumtjs9ipt.fsf@netpanic.org> (Simon Streit's message of "Wed, 19 Jan 2022 10:29:34 +0100")

Hi,

Simon Streit <simon@netpanic.org> skribis:

> Unfortunately while preparing its service, there is this one part that
> I'm having trouble trying to get working:
>
> #$(if interface
>       #~(for-each (lambda (arg)
>                     (display (string-append "--interface" arg))
>                     ;; (format #t "--interface ~a " (list->string arg))
>                     )
>                   #$(interface))
>       '())
>
> Which is the main intention for this post: I'd really appreciate a little
> hint on how to solve this small problem.  Everything else looks okay.

My understanding is that you intend the ‘interface’ field to be either
#f or a string, is that right?

When you write:

  (interface)

that means: “call the procedure bound to ‘interface’, passing it zero
arguments”.  However, if ‘interface’ is a string, you cannot call it, so
you get a wrong-type-to-apply error.

Likewise, ‘for-each’ expects its second argument to be a list.  But
here, ‘interface’ is supposedly a string, not a list, so if you do:

  (for-each (lambda …) interface)

you’ll get a wrong-type-argument error.

HTH!

Ludo’.


  reply	other threads:[~2022-01-24 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19  9:29 WSDD Service Module Simon Streit
2022-01-24 15:46 ` Ludovic Courtès [this message]
2022-01-25 12:56   ` Simon Streit
     [not found]   ` <ygu8rv4ouls.fsf@netpanic.org>
2022-01-25 13:56     ` Ludovic Courtès
2022-01-25 19:10       ` Simon Streit
  -- strict thread matches above, loose matches on Subject: below --
2022-01-21 11:51 Simon Streit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee4xrva3.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=simon@netpanic.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).