Fix ghcup-tui

This commit is contained in:
Julian Ospald 2021-02-24 12:42:36 +01:00
parent b4f9e12293
commit c455b521a9
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -486,19 +486,12 @@ del' BrickState { appData = BrickData {..} } (_, ListResult {..}) = do
let run = runLogger . flip runReaderT settings . runE @'[NotInstalled, VerNotFound]
(run $ do
vi <- liftE @_ @'[VerNotFound] $ getVersionInfo lVer lTool dls
?? VerNotFound lVer lTool
case lTool of
GHC -> do
vi <- liftE @_ @'[VerNotFound] $ getVersionInfo lVer Cabal dls
?? VerNotFound lVer Cabal
liftE $ rmGHCVer (GHCTargetVersion lCross lVer) $> Just vi
Cabal -> do
vi <- liftE @_ @'[VerNotFound] $ getVersionInfo lVer Cabal dls
?? VerNotFound lVer Cabal
liftE $ rmCabalVer lVer $> Just vi
HLS -> do
vi <- liftE @_ @'[VerNotFound] $ getVersionInfo lVer Cabal dls
?? VerNotFound lVer Cabal
liftE $ rmHLSVer lVer $> Just vi
GHC -> liftE $ rmGHCVer (GHCTargetVersion lCross lVer) $> Just vi
Cabal -> liftE $ rmCabalVer lVer $> Just vi
HLS -> liftE $ rmHLSVer lVer $> Just vi
GHCup -> pure Nothing
)
>>= \case