Ludovic Courtès (2016-07-04 01:20 +0300) wrote: > Hello! > > The ‘wip-gexp-imported-modules’ branch changes gexps so that each gexp > embeds information about which modules need to be imported into its > execution environment. > > Before you would do: > > (gexp->derivation "foo" > #~(begin > (use-modules (guix build utils)) > …) > #:modules '((guix build utils))) > > to specify that (guix build utils) must be imported in the build > environment of “foo”. After, it becomes: > > (gexp->derivation "foo" > (with-imported-modules '((guix build utils)) > #~(begin > (use-modules (guix build utils)) > …))) > > The gain (not visible here) is that when you nest gexps, the outermost > gexp now contains all the info about modules that need to be imported. > That way, no side channel is needed to carry the imported module info > (by “side channel”, I mean things like the ‘imported-modules’ field > currently found in <shepherd-service> and several other places.) Thus, > it should be easier to compose gexps.
Great! I like 'with-...' things. And wow, you did a huge work again! > I plan to merge it within a day or two. > > Comments welcome! I see you added the indentation rule for 'with-imported-modules' in "emacs/guix-devel.el". I think it would also be good to add it to 'guix-devel-keywords' (as you did in commit cd6f6c22fb) to make it highlighted as the other keywords. -- Alex