Karya, built on Sun Nov 26 01:04:37 PST 2017 (patch 0a920b2bde70c0cbac8ee09d158064798b61bbe5)

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.CmdUpdate] 
-> MVar.MVar Ui.State 
-> IO ([Update.UiUpdate], Ui.State, Cmd.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.