factor out installStack' function

This commit is contained in:
Arjun Kathuria 2021-07-23 16:43:43 +05:30
parent f212eb4570
commit 8f6a7ba39c

View File

@ -854,13 +854,14 @@ installStackBindist dlinfo ver = do
let lInstStack = headMay . reverse . sort $ sVers
when (maybe True (ver >=) lInstStack) $ liftE $ setStack ver
where
-- | Install an unpacked stack distribution.
installStack' :: (MonadLogger m, MonadCatch m, MonadIO m)
=> FilePath -- ^ Path to the unpacked stack bindist (where the executable resides)
-> FilePath -- ^ Path to install to
-> Version
-> Excepts '[CopyError] m ()
installStack' path inst = do
installStack' path inst ver = do
lift $ $(logInfo) "Installing stack"
let stackFile = "stack"
liftIO $ createDirRecursive' inst
@ -873,7 +874,6 @@ installStackBindist dlinfo ver = do
---------------------
--[ Set GHC/cabal ]--
---------------------