[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patches to implement system roll-back and switch-generation
From: |
Ludovic Courtès |
Subject: |
Re: Patches to implement system roll-back and switch-generation |
Date: |
Wed, 19 Oct 2016 23:07:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi Chris,
Chris Marusich <address@hidden> skribis:
> address@hidden (Ludovic Courtès) writes:
>> We can now avoid monadic procedures by using the declarative counterpart
>> of the monadic API. That is, we could write:
>>
>> (define (grub-configuration-file …) ;normal proc
>> (computed-file "grub.cfg" builder))
>>
>> instead of:
>>
>> (define (grub-configuration-file …) ;monadic proc
>> (gexp->derivation "grub.cfg" builder))
>>
>> I would welcome such changes.
>>
>
> That's an interesting idea. However, in this case, I think we need to
> pass the build options (from the parsed command-line arguments) along
> somehow. How should we set the build options when using the declarative
> 'computed-file' procedure? It seems like the most obvious way would be
> to pass the build options in as arguments to the 'computed-file'
> procedure, but is there a better way?
Which build options? There’s a direct correspondence between, say,
‘gexp->derivation’ and ‘computed-file’ and the arguments are essentially
the same. Unless I’m overlooking something (again!), the change I
suggest above is a mechanical change.
HTH,
Ludo’.