From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: gexps and =?utf-8?Q?=E2=80=98with-imported-modules=E2=80=99?= Date: Mon, 04 Jul 2016 10:45:56 +0300 Message-ID: <87wpl1j16z.fsf@gmail.com> References: <87oa6ebby5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJyZt-00012X-HV for guix-devel@gnu.org; Mon, 04 Jul 2016 03:46:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJyZp-0006Hl-9h for guix-devel@gnu.org; Mon, 04 Jul 2016 03:46:00 -0400 In-Reply-To: <87oa6ebby5.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 04 Jul 2016 00:20:50 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel Ludovic Court=C3=A8s (2016-07-04 01:20 +0300) wrote: > Hello! > > The =E2=80=98wip-gexp-imported-modules=E2=80=99 branch changes gexps so t= hat 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)) > =E2=80=A6) > #:modules '((guix build utils))) > > to specify that (guix build utils) must be imported in the build > environment of =E2=80=9Cfoo=E2=80=9D. After, it becomes: > > (gexp->derivation "foo" > (with-imported-modules '((guix build utils)) > #~(begin > (use-modules (guix build utils)) > =E2=80=A6))) > > 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 =E2=80=9Cside channel=E2=80=9D, I mean things like the =E2=80=98impor= ted-modules=E2=80=99 field > currently found in 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. --=20 Alex