From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: guix-devel@gnu.org
Subject: Re: package.scm: (profile-derivation (%store) '())
Date: Fri, 20 Sep 2013 22:21:15 +0200 [thread overview]
Message-ID: <877gebdz2c.fsf@gnu.org> (raw)
In-Reply-To: <87r4cjjsu2.fsf@karetnikov.org> (Nikita Karetnikov's message of "Fri, 20 Sep 2013 21:39:17 +0400")
Nikita Karetnikov <nikita@karetnikov.org> skribis:
> I’d like to know how ‘roll-back’ creates an empty generation because
> it’s necessary to do the same for ‘--delete-generations’.
>
> However, I fail to understand how (profile-derivation (%store) ‘())
> works (or any other function that uses (%store)). I assume that some
> code should set ‘%store’ to something else. Like so:
>
> scheme@(guix scripts package)> %store
> $1 = #<<parameter> 934e7f8 proc: #<procedure 934e810 at ice-9/boot-9.scm:3154:17 () | (x)>>
> scheme@(guix scripts package)> (%store)
> $2 = #f
> scheme@(guix scripts package)> (%store "FOO")
> $3 = #f
> scheme@(guix scripts package)> (%store)
> $4 = "FOO"
>
> But I don’t see anything similar in ‘package.scm’.
‘%store’ is a SRFI-39 parameter (info "(guile) Parameters"), aka. a
dynamically-scoped variable.
It is initialized with the ‘parameterize’ form, which sets its value for
the dynamic extent of its body.
HTH,
Ludo’.
next prev parent reply other threads:[~2013-09-20 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 17:39 package.scm: (profile-derivation (%store) '()) Nikita Karetnikov
2013-09-20 20:21 ` Ludovic Courtès [this message]
2013-09-20 21:08 ` Nikita Karetnikov
2013-09-20 21:35 ` 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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gebdz2c.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=nikita@karetnikov.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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).