@@ -16,11 +16,11 @@ import qualified GHCup.GHC as GHC
1616import qualified GHCup.HLS as HLS
1717import GHCup.Errors
1818import GHCup.Types
19- import GHCup.Types.Optics
2019import GHCup.Utils
2120import GHCup.Prelude.Logger
2221import GHCup.Prelude.String.QQ
2322import GHCup.OptParse.Common
23+ import GHCup.Types.Optics
2424
2525#if !MIN_VERSION_base(4,13,0)
2626import Control.Monad.Fail ( MonadFail )
@@ -36,6 +36,7 @@ import Data.Versions ( Version, prettyVer, version, p
3636import qualified Data.Versions as V
3737import Data.Text ( Text )
3838import Haskus.Utils.Variant.Excepts
39+ import Optics
3940import Options.Applicative hiding ( style )
4041import Options.Applicative.Help.Pretty ( text )
4142import Prelude hiding ( appendFile )
@@ -511,7 +512,7 @@ compile compileCommand settings Dirs{..} runAppState runLogger = do
511512 HLS. SourceDist targetVer -> do
512513 GHCupInfo { _ghcupDownloads = dls } <- lift getGHCupInfo
513514 let vi = getVersionInfo targetVer HLS dls
514- forM_ (_viPreCompile =<< vi) $ \ msg -> do
515+ forM_ (view viPreCompile =<< vi) $ \ msg -> do
515516 lift $ logInfo msg
516517 lift $ logInfo
517518 " ...waiting for 5 seconds, you can still abort..."
@@ -539,7 +540,7 @@ compile compileCommand settings Dirs{..} runAppState runLogger = do
539540 VRight (vi, tv) -> do
540541 runLogger $ logInfo
541542 " HLS successfully compiled and installed"
542- forM_ (_viPostInstall =<< vi) $ \ msg ->
543+ forM_ (view viPostInstall =<< vi) $ \ msg ->
543544 runLogger $ logInfo msg
544545 liftIO $ putStr (T. unpack $ prettyVer tv)
545546 pure ExitSuccess
@@ -563,7 +564,7 @@ compile compileCommand settings Dirs{..} runAppState runLogger = do
563564 GHC. SourceDist targetVer -> do
564565 GHCupInfo { _ghcupDownloads = dls } <- lift getGHCupInfo
565566 let vi = getVersionInfo targetVer GHC dls
566- forM_ (_viPreCompile =<< vi) $ \ msg -> do
567+ forM_ (view viPreCompile =<< vi) $ \ msg -> do
567568 lift $ logInfo msg
568569 lift $ logInfo
569570 " ...waiting for 5 seconds, you can still abort..."
@@ -593,7 +594,7 @@ compile compileCommand settings Dirs{..} runAppState runLogger = do
593594 VRight (vi, tv) -> do
594595 runLogger $ logInfo
595596 " GHC successfully compiled and installed"
596- forM_ (_viPostInstall =<< vi) $ \ msg ->
597+ forM_ (view viPostInstall =<< vi) $ \ msg ->
597598 runLogger $ logInfo msg
598599 liftIO $ putStr (T. unpack $ tVerToText tv)
599600 pure ExitSuccess
0 commit comments