Actually, a fix is likely simpler than I indicated, and requires no deep refactoring. It's not the
update() functions that are relevant, but the
recv-methods of nodes in the signal graph, and they do already have a timestep argument and propagate it appropriately. So in
Native/Signal.js, the
timestamp function should not simply rely on a call to
liftN, but instead create a new node like the one
liftN would create, but where the
recv-method is such that it uses its timestep argument as the first component for the output pairs. So, more or less, inlining a specialized version of
liftN into these lines:
https://github.com/elm-lang/core/blob/7470663e13af7ead52999e8704dfa5ebdf1fd885/src/Native/Signal.js#L121-124 instead of having the "asynchronous" call to
localRuntime.timer.now() there.
Still, Evan should have his say first about this issue.