all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: gexps and ‘with-imported-modules’
Date: Mon, 04 Jul 2016 10:45:56 +0300	[thread overview]
Message-ID: <87wpl1j16z.fsf@gmail.com> (raw)
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")

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

  reply	other threads:[~2016-07-04  7:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-03 22:20 gexps and ‘with-imported-modules’ Ludovic Courtès
2016-07-04  7:45 ` Alex Kost [this message]
2016-07-04 13:39   ` Ludovic Courtès
2016-07-12 20:58 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpl1j16z.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.