Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
GHCup.Brick.Actions
Synopsis
- updateList :: BrickData -> BrickState -> BrickState
- constructList :: BrickData -> BrickSettings -> Maybe BrickInternalState -> BrickInternalState
- selectBy :: Tool -> (ListResult -> Bool) -> BrickInternalState -> BrickInternalState
- selectLatest :: BrickInternalState -> BrickInternalState
- replaceLR :: (ListResult -> Bool) -> [ListResult] -> Maybe BrickInternalState -> BrickInternalState
- filterVisible :: Bool -> ListResult -> Bool
- withIOAction :: (Ord n, Eq n) => ((Int, ListResult) -> ReaderT AppState IO (Either String a)) -> EventM n BrickState ()
- installWithOptions :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => InstallOptions -> (Int, ListResult) -> m (Either String ())
- install' :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => (Int, ListResult) -> m (Either String ())
- set' :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => (Int, ListResult) -> m (Either String ())
- logGHCPostRm :: (MonadReader env m, HasLog env, MonadIO m) => GHCTargetVersion -> m ()
- del' :: (MonadReader AppState m, MonadIO m, MonadFail m, MonadMask m, MonadUnliftIO m) => (Int, ListResult) -> m (Either String ())
- changelog' :: (MonadReader AppState m, MonadIO m) => (Int, ListResult) -> m (Either String ())
- compileGHC :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => CompileGHCOptions -> (Int, ListResult) -> m (Either String ())
- compileHLS :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => CompileHLSOptions -> (Int, ListResult) -> m (Either String ())
- settings' :: IORef AppState
- getGHCupInfo :: IO (Either String GHCupInfo)
- getAppData :: Maybe GHCupInfo -> IO (Either String BrickData)
- keyHandlers :: KeyBindings -> [(KeyCombination, BrickSettings -> String, EventM Name BrickState ())]
Documentation
updateList :: BrickData -> BrickState -> BrickState Source #
Update app data and list internal state based on new evidence.
This synchronises BrickInternalState
with BrickData
and BrickSettings
.
constructList :: BrickData -> BrickSettings -> Maybe BrickInternalState -> BrickInternalState Source #
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.
installWithOptions :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => InstallOptions -> (Int, ListResult) -> m (Either String ()) Source #
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 #
compileGHC :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => CompileGHCOptions -> (Int, ListResult) -> m (Either String ()) Source #
compileHLS :: (MonadReader AppState m, MonadIO m, MonadThrow m, MonadFail m, MonadMask m, MonadUnliftIO m, Alternative m) => CompileHLSOptions -> (Int, ListResult) -> m (Either String ()) Source #
keyHandlers :: KeyBindings -> [(KeyCombination, BrickSettings -> String, EventM Name BrickState ())] Source #