From 997dcadf89f42c577e7e4f6c80312eb64158bb33 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 15 Apr 2020 17:06:48 +0200 Subject: [PATCH] Show the version when doing 'ghcup set' --- app/ghcup/Main.hs | 4 ++-- lib/GHCup.hs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/ghcup/Main.hs b/app/ghcup/Main.hs index f257e2f..1ae7178 100644 --- a/app/ghcup/Main.hs +++ b/app/ghcup/Main.hs @@ -699,8 +699,8 @@ Check the logs at ~/.ghcup/logs and the build directory #{tmpdir} for more clues liftE $ setGHC v SetGHCOnly ) >>= \case - VRight _ -> - runLogger $ $(logInfo) ("GHC successfully set") + VRight v -> + runLogger $ $(logInfo) [i|GHC #{prettyVer v} successfully set as default version|] VLeft e -> runLogger ($(logError) [i|#{e}|]) >> exitFailure diff --git a/lib/GHCup.hs b/lib/GHCup.hs index 961471d..f8fa59d 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -228,7 +228,7 @@ installCabalBin bDls ver mpfReq = do setGHC :: (MonadLogger m, MonadThrow m, MonadFail m, MonadIO m) => Version -> SetGHC - -> Excepts '[NotInstalled] m () + -> Excepts '[NotInstalled] m Version setGHC ver sghc = do let verBS = verToBS ver ghcdir <- liftIO $ ghcupGHCDir ver @@ -266,7 +266,7 @@ setGHC ver sghc = do -- create symlink for share dir lift $ symlinkShareDir ghcdir verBS - pure () + pure ver where @@ -732,7 +732,7 @@ postGHCInstall :: (MonadLogger m, MonadThrow m, MonadFail m, MonadIO m) => Version -> Excepts '[NotInstalled] m () postGHCInstall ver = do - liftE $ setGHC ver SetGHC_XYZ + void $ liftE $ setGHC ver SetGHC_XYZ -- Create ghc-x.y symlinks. This may not be the current -- version, create it regardless.