unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: Stefan Huchler <stefan.huchler@mail.de>
Cc: help-guix@gnu.org
Subject: Re: define udev-service-type fails with "did you forget to import.." error
Date: Sun, 04 Oct 2020 22:55:29 +0200	[thread overview]
Message-ID: <87blhhaeym.fsf@nckx> (raw)
In-Reply-To: <87a6x120yq.fsf@mail.de>

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

Stefan,

Stefan Huchler 写道:
> A the double @ was a typo?

No, it's a documented feature in the Guile manual:

   “You can also directly refer to bindings in a module by using 
   the ‘@’
   syntax.  For example, instead of using the ‘use-modules’ 
   statement from
   above and writing ‘unixy:pipe-open’ to refer to the ‘pipe-open’ 
   from the
   ‘(ice-9 popen)’, you could also write ‘(@ (ice-9 popen) 
   open-pipe)’.
   Thus an alternative to the complete ‘use-modules’ statement 
   would be

     (define unixy:pipe-open (@ (ice-9 popen) open-pipe))
     (define unixy:close-pipe (@ (ice-9 popen) close-pipe))

   There is also ‘@@’, which can be used like ‘@’, but does not 
   check
   whether the variable that is being accessed is actually 
   exported.  Thus,
   ‘@@’ can be thought of as the impolite version of ‘@’ and 
   should only be
   used as a last resort or for debugging, for example.

   Note that just as with a ‘use-modules’ statement, any module 
   that has
   not yet been loaded will be loaded when referenced by a ‘@’ or 
   ‘@@’
   form.” -- (guile)Using Guile Modules

I think I'm done here though.

Good luck,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

  reply	other threads:[~2020-10-04 20:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-27 21:23 define udev-service-type fails with "did you forget to import.." error Stefan Huchler
2020-09-29 14:12 ` Ludovic Courtès
2020-09-29 16:23   ` Stefan Huchler
2020-10-04 10:29     ` Ricardo Wurmus
2020-10-04 14:18       ` Stefan Huchler
2020-10-04 15:00         ` Tobias Geerinckx-Rice
2020-10-04 20:06           ` Stefan Huchler
2020-10-04 20:25           ` Stefan Huchler
2020-10-04 20:55             ` Tobias Geerinckx-Rice [this message]
2020-10-04 10:18   ` Stefan Huchler

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=87blhhaeym.fsf@nckx \
    --to=me@tobias.gr \
    --cc=help-guix@gnu.org \
    --cc=stefan.huchler@mail.de \
    /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.
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).