Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred



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



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.Msgs 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 #


:: Cmd.State 
-> Maybe.Maybe (Path.Canonical, GitT.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.