In the following example, updatedState is only referenced in the let in body value, and it's only done once and as the value to be updated in a record update expression.
let
updatedState = { state | field1 = state.field1 + 1 }
cmd = createCmd ()
in
( { updatedState | field2 = state.field2 + 1 }, cmd )
Given these peculiar situations, we can merge updatedState into the return value:
In the following example,
updatedState
is only referenced in thelet in
body value, and it's only done once and as the value to be updated in a record update expression.Given these peculiar situations, we can merge
updatedState
into the return value:Other situations to handle
Collapsable let declarations
Overlapping fields
References to previous step's unchanged fields
References to previous step's changed fields. I think in this case we don't want to report an error.
Did I miss other cases we'd need to handle?