Show the version when doing 'ghcup set'
This commit is contained in:
parent
b2312629ce
commit
997dcadf89
@ -699,8 +699,8 @@ Check the logs at ~/.ghcup/logs and the build directory #{tmpdir} for more clues
|
|||||||
liftE $ setGHC v SetGHCOnly
|
liftE $ setGHC v SetGHCOnly
|
||||||
)
|
)
|
||||||
>>= \case
|
>>= \case
|
||||||
VRight _ ->
|
VRight v ->
|
||||||
runLogger $ $(logInfo) ("GHC successfully set")
|
runLogger $ $(logInfo) [i|GHC #{prettyVer v} successfully set as default version|]
|
||||||
VLeft e ->
|
VLeft e ->
|
||||||
runLogger ($(logError) [i|#{e}|]) >> exitFailure
|
runLogger ($(logError) [i|#{e}|]) >> exitFailure
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ installCabalBin bDls ver mpfReq = do
|
|||||||
setGHC :: (MonadLogger m, MonadThrow m, MonadFail m, MonadIO m)
|
setGHC :: (MonadLogger m, MonadThrow m, MonadFail m, MonadIO m)
|
||||||
=> Version
|
=> Version
|
||||||
-> SetGHC
|
-> SetGHC
|
||||||
-> Excepts '[NotInstalled] m ()
|
-> Excepts '[NotInstalled] m Version
|
||||||
setGHC ver sghc = do
|
setGHC ver sghc = do
|
||||||
let verBS = verToBS ver
|
let verBS = verToBS ver
|
||||||
ghcdir <- liftIO $ ghcupGHCDir ver
|
ghcdir <- liftIO $ ghcupGHCDir ver
|
||||||
@ -266,7 +266,7 @@ setGHC ver sghc = do
|
|||||||
-- create symlink for share dir
|
-- create symlink for share dir
|
||||||
lift $ symlinkShareDir ghcdir verBS
|
lift $ symlinkShareDir ghcdir verBS
|
||||||
|
|
||||||
pure ()
|
pure ver
|
||||||
|
|
||||||
where
|
where
|
||||||
|
|
||||||
@ -732,7 +732,7 @@ postGHCInstall :: (MonadLogger m, MonadThrow m, MonadFail m, MonadIO m)
|
|||||||
=> Version
|
=> Version
|
||||||
-> Excepts '[NotInstalled] m ()
|
-> Excepts '[NotInstalled] m ()
|
||||||
postGHCInstall ver = do
|
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
|
-- Create ghc-x.y symlinks. This may not be the current
|
||||||
-- version, create it regardless.
|
-- version, create it regardless.
|
||||||
|
Loading…
Reference in New Issue
Block a user