Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Cmd.ResponderSync

Description

Subset of the responder that handles syncing from Ui.State to the UI.

Synopsis

Documentation

sync Source #

Arguments

:: Sync 
-> Ui.State

state before Cmd was run

-> Ui.State

current state

-> Cmd.State 
-> Update.UiDamage 
-> MVar.MVar Ui.State 
-> IO ([Update.UiUpdate], Ui.State)

Sync uses Update.DisplayUpdates, but the diff also produces UiUpdates, which are needed for incremental save and score damage.

Sync ui_to to the UI.

Returns both UI state and cmd state since verification may clean up the UI state, and this is where the undo history is stored in Cmd.State.