Thank you so much Ricardo, you have no idea how big of a thorn you
removed from my side. I owe you one.

Ricardo Wurmus <rek...@elephly.net> writes:

> e...@beaver-labs.com writes:
>
>> For example, given that "minimal-container" is an operating system, I
>> can do the following:
>>
>> (set-fields minimal-container ((operating-system-host-name) "toto"))
>>
>> But not:
>>
>> (set-fields minimal-container ((operating-system-label) "toto"))
>
> In Guile we usually try to avoid mutation like that.  The records API
> allows you to use inheritance instead:
>
>   (operating-system
>     (inherit minimal-container)
>     (label "toto"))
>
> Thunking just means that the field is a procedure that returns a value
> when called with no arguments.  The records in (guix records) are not
> plain SRFI9 records, so I would not expect set-fields to work at all.

Reply via email to