ghcup-0.1.50.1: ghc toolchain installer
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHCup.Brick.Actions

Synopsis

Documentation

updateList :: BrickData -> BrickState -> BrickState Source #

Update app data and list internal state based on new evidence. This synchronises BrickInternalState with BrickData and BrickSettings.

selectBy :: Tool -> (ListResult -> Bool) -> BrickInternalState -> BrickInternalState Source #

Focus on the tool section and the predicate which matches. If no result matches, focus on index 0

selectLatest :: BrickInternalState -> BrickInternalState Source #

Select the latests GHC tool

replaceLR :: (ListResult -> Bool) -> [ListResult] -> Maybe BrickInternalState -> BrickInternalState Source #

Replace the appState or construct it based on a filter function and a new [ListResult] evidence. When passed an existing appState, tries to keep the selected element.

filterVisible :: Bool -> ListResult -> Bool Source #

withIOAction :: (Ord n, Eq n) => ((Int, ListResult) -> ReaderT AppState IO (Either String a)) -> EventM n BrickState () Source #

Suspend the current UI and run an IO action in terminal. If the IO action returns a Left value, then it's thrown as userError.

install' :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => (Int, ListResult) -> m (Either String ()) Source #

set' :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => (Int, ListResult) -> m (Either String ()) Source #

logGHCPostRm :: (MonadReader env m, HasLog env, MonadIO m) => GHCTargetVersion -> m () Source #

del' :: (MonadReader AppState m, MonadIO m, MonadFail m, MonadMask m, MonadUnliftIO m) => (Int, ListResult) -> m (Either String ()) Source #

changelog' :: (MonadReader AppState m, MonadIO m) => (Int, ListResult) -> m (Either String ()) Source #

settings' :: IORef AppState Source #

keyHandlers :: KeyBindings -> [(KeyCombination, BrickSettings -> String, EventM Name BrickState ())] Source #