Tomas Volf <[email protected]> writes:

>> (There’s a way to break this hygiene rule (‘define-configuration’ does
>> that), but it’s fraught with peril.)
>>
>> Besides, one might be tempted to think that:
>>
>>   this-package-inputs = (package-inputs this-package)
>>
>> … which would not be the case.

After some (moderate) alcohol intake, I think I understand this now.
And it finally clicked for me why I was having infinite loops with
this-operating-system.  My mental model was "all fields are copied by
inherit, so when inside the inputs thunk (package-inputs this-package)
refers to the parent package's inputs".  But in reality I was just
recursing the same thunk.

Right, so the original suggested name sucks, but with a slight name
change, it not just recovers, but improves over the original (well,
IMHO).  Which of the following

    (package (inherit foo)
      (inputs (modify-inputs inputs ...)))

    (package (inherit foo)
      (inputs (modify-inputs parent-package-inputs ...)))

is, in your opinion, more obvious to an average user about what it does?

(How to get the parent-package-inputs identifier was described in the
previous email.)

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Reply via email to