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

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.