Reformat versionCompleter
This commit is contained in:
parent
4a50c8ecb7
commit
10ca9ea827
@ -782,43 +782,28 @@ tagCompleter =
|
|||||||
|
|
||||||
|
|
||||||
versionCompleter :: Maybe ListCriteria -> Tool -> Completer
|
versionCompleter :: Maybe ListCriteria -> Tool -> Completer
|
||||||
versionCompleter criteria tool =
|
versionCompleter criteria tool = listIOCompleter $ do
|
||||||
listIOCompleter $ do
|
let loggerConfig = LoggerConfig
|
||||||
let
|
|
||||||
loggerConfig =
|
|
||||||
LoggerConfig
|
|
||||||
{ lcPrintDebug = False
|
{ lcPrintDebug = False
|
||||||
, colorOutter = mempty
|
, colorOutter = mempty
|
||||||
, rawOutter = mempty
|
, rawOutter = mempty
|
||||||
}
|
}
|
||||||
|
|
||||||
runLogger =
|
runLogger = myLoggerT loggerConfig
|
||||||
myLoggerT loggerConfig
|
|
||||||
|
|
||||||
mpFreq <-
|
mpFreq <- runLogger . runE $ platformRequest
|
||||||
runLogger . runE $
|
|
||||||
platformRequest
|
|
||||||
|
|
||||||
forFold mpFreq $ \pfreq -> do
|
forFold mpFreq $ \pfreq -> do
|
||||||
dirs <- getDirs
|
dirs <- getDirs
|
||||||
let
|
let simpleSettings = Settings False False Never Curl False GHCupURL
|
||||||
simpleSettings =
|
simpleAppState = AppState simpleSettings dirs defaultKeyBindings
|
||||||
Settings False False Never Curl False GHCupURL
|
runEnv = runLogger . flip runReaderT simpleAppState
|
||||||
simpleAppState =
|
|
||||||
AppState simpleSettings dirs defaultKeyBindings
|
|
||||||
runEnv =
|
|
||||||
runLogger . flip runReaderT simpleAppState
|
|
||||||
|
|
||||||
mGhcUpInfo <-
|
mGhcUpInfo <- runEnv . runE $ readFromCache
|
||||||
runEnv . runE $ readFromCache
|
|
||||||
|
|
||||||
forFold mGhcUpInfo $ \(GHCupInfo _ dls) -> do
|
forFold mGhcUpInfo $ \(GHCupInfo _ dls) -> do
|
||||||
installedVersions <-
|
installedVersions <- runEnv $ listVersions dls (Just tool) criteria pfreq
|
||||||
runEnv $
|
return $ T.unpack . prettyVer . lVer <$> installedVersions
|
||||||
listVersions dls (Just tool) criteria pfreq
|
|
||||||
|
|
||||||
return $
|
|
||||||
T.unpack . prettyVer . lVer <$> installedVersions
|
|
||||||
|
|
||||||
|
|
||||||
versionParser :: Parser GHCTargetVersion
|
versionParser :: Parser GHCTargetVersion
|
||||||
|
Loading…
Reference in New Issue
Block a user