Ludovic Courtès (2015-11-01 20:18 +0300) wrote: > Alex Kost <alez...@gmail.com> 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: > > $ 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))
Ah, good example, thank you! >> 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. Great, thanks! > Thanks, and sorry for the confusion! No problem, pushed. -- Alex