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] let run = runLogger . flip runReaderT settings . runE @'[NotInstalled, VerNotFound]
(run $ do (run $ do
vi <- liftE @_ @'[VerNotFound] $ getVersionInfo lVer lTool dls
?? VerNotFound lVer lTool
case lTool of case lTool of
GHC -> do GHC -> liftE $ rmGHCVer (GHCTargetVersion lCross lVer) $> Just vi
vi <- liftE @_ @'[VerNotFound] $ getVersionInfo lVer Cabal dls Cabal -> liftE $ rmCabalVer lVer $> Just vi
?? VerNotFound lVer Cabal HLS -> liftE $ rmHLSVer lVer $> Just vi
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
GHCup -> pure Nothing GHCup -> pure Nothing
) )
>>= \case >>= \case