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

Cmd.Internal

Description

Internal Cmds, that keep bits of Cmd.State up to date that everyone else relies on.

Synopsis

Documentation

cmd_record_keys :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #

Record keydowns into the State modifier map.

cmd_record_ui_updates :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #

Catch UiMsg.UiUpdates from the UI, and modify the state accordingly to reflect the UI state.

Unlike all the other Cmds, the state changes this makes are not synced. UiUpdates report changes that have already occurred directly on the UI, so syncing them would be redundant.

update_ui_state :: Cmd.M m => Msg.Msg -> m Cmd.Status Source #

This is the other half of cmd_record_ui_updates, whose output is synced like normal Cmds. When its a block update I have to update the other views.

sync_status :: Ui.State -> Cmd.State -> Update.UiDamage -> Cmd.CmdId Cmd.Status Source #

This is called after every non-failing cmd.

can_checkpoint Source #

Arguments

:: Cmd.State 
-> Maybe.Maybe (Path.Canonical, GitTypes.Commit)

I need both a repo and a previous commit to checkpoint.

Return Just if there will be a git checkpoint. update_saved has to predict this because by the time save_history runs, it's too late to make Ui.State changes.

This is not defined in Cmd.Undo to avoid a circular import.