Implements the desugaring of &foo to \record, field -> { record & foo: field }, a.k.a record updates for a single field. This unblocks some of the code in the Action-State proposal, among other things.
This was initially attempted a year ago in https://github.com/roc-lang/roc/pull/5367, which was abandoned the day after publishing. The implementations differ somewhat, as that version was "proper syntax" whereas this is just sugar, but the comments there may be useful to look at.
Implements the desugaring of
&foo
to\record, field -> { record & foo: field }
, a.k.a record updates for a single field. This unblocks some of the code in the Action-State proposal, among other things.This was initially attempted a year ago in https://github.com/roc-lang/roc/pull/5367, which was abandoned the day after publishing. The implementations differ somewhat, as that version was "proper syntax" whereas this is just sugar, but the comments there may be useful to look at.