[Top][All Lists]

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

Re: define udev-service-type fails with "did you forget to import.." err

From: Tobias Geerinckx-Rice
Subject: Re: define udev-service-type fails with "did you forget to import.." error
Date: Sun, 04 Oct 2020 22:55:29 +0200


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,


Attachment: signature.asc
Description: PGP signature

reply via email to

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