Alex Kost <[email protected]> skribis: > Ludovic Courtès (2015-10-29 23:14 +0300) wrote:
[...] >> You could use #:autoload, but only for ‘%updaters’ because >> ‘upstream-updater-name’ is a macro so it needs to be available at >> expansion time. > > I looked at (info "(guile) Using Guile Modules") and it has the following: > > An autoload is a good way to put off loading a big module > until it’s really needed, for instance for faster startup or > if it will only be needed in certain circumstances. > > ‘@’ can do a similar thing (see Using Guile Modules), but > in that case an ‘@’ form must be written every time a binding > from the module is used. > > To me it sounds like ‘@’ does the same thing as ‘#:autoload’, no? I guess I was confused. A simple example confirms what the manual explains: --8<---------------cut here---------------start------------->8--- $ guild compile t.scm wrote `/home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/home/ludo/src/guix/t.scm.go' $ guile t.scm $ cat t.scm (define (foo) (@ (asdfasdfa) sdfsf)) --8<---------------cut here---------------end--------------->8--- > Also #:autoload should be used inside (define-module ...), but > ‘guix-main.scm’ does not define a module. Oh, right, I had overlooked that. So yes, you can go ahead with your initial approach. Thanks, and sorry for the confusion! Ludo’.
