Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Ui.Diff

Description

Diff two states to produce a list of Updates, which must be sent to the UI to make it display the second state.

This is unpleasantly complicated and subtle. I wish I knew a better way!

Synopsis

# Documentation

diff :: [Update.CmdUpdate] -> Ui.State -> Ui.State -> ([Update.UiUpdate], [Update.DisplayUpdate]) Source #

Emit a list of the necessary Updates to turn st1 into st2.

This diff is meant to determine score damage for the block, which determines what will have to be rederived, if anything.

This is repeating some work done in diff, but is fundamentally different because it cares about nonvisible changes, e.g. track title change on a block without a view.

Diff the events on one track. This will only emit CmdTrackEvents, and won't emit anything if the track title changed, or was created or deleted. Those diffs should be picked up by the main diff.

This is like derive_diff, but it only needs to return a Bool. It's also more sensitive in that it's looking for any change that you might want to save to disk, not just changes that could require rederivation.