rename some auxiliary functions to their "unpacked" versions
This commit is contained in:
parent
692cd1616b
commit
71e6dbfdca
24
lib/GHCup.hs
24
lib/GHCup.hs
@ -448,9 +448,9 @@ installCabalBindist dlinfo ver isoFilepath = do
|
|||||||
if isIsolatedInstall
|
if isIsolatedInstall
|
||||||
then do
|
then do
|
||||||
lift $ $(logInfo) [i|isolated installing Cabal to #{isoDir}|]
|
lift $ $(logInfo) [i|isolated installing Cabal to #{isoDir}|]
|
||||||
liftE $ installCabal' workdir isoDir ver
|
liftE $ installCabalUnpacked workdir isoDir ver
|
||||||
else do
|
else do
|
||||||
liftE $ installCabal' workdir binDir ver
|
liftE $ installCabalUnpacked workdir binDir ver
|
||||||
|
|
||||||
-- create symlink if this is the latest version
|
-- create symlink if this is the latest version
|
||||||
-- not applicable for isolated installs
|
-- not applicable for isolated installs
|
||||||
@ -460,12 +460,12 @@ installCabalBindist dlinfo ver isoFilepath = do
|
|||||||
when (maybe True (ver >=) lInstCabal) $ liftE $ setCabal ver
|
when (maybe True (ver >=) lInstCabal) $ liftE $ setCabal ver
|
||||||
|
|
||||||
-- | Install an unpacked cabal distribution.
|
-- | Install an unpacked cabal distribution.
|
||||||
installCabal' :: (MonadLogger m, MonadCatch m, MonadIO m)
|
installCabalUnpacked :: (MonadLogger m, MonadCatch m, MonadIO m)
|
||||||
=> FilePath -- ^ Path to the unpacked cabal bindist (where the executable resides)
|
=> FilePath -- ^ Path to the unpacked cabal bindist (where the executable resides)
|
||||||
-> FilePath -- ^ Path to install to
|
-> FilePath -- ^ Path to install to
|
||||||
-> Version
|
-> Version
|
||||||
-> Excepts '[CopyError] m ()
|
-> Excepts '[CopyError] m ()
|
||||||
installCabal' path inst ver = do
|
installCabalUnpacked path inst ver = do
|
||||||
lift $ $(logInfo) "Installing cabal"
|
lift $ $(logInfo) "Installing cabal"
|
||||||
let cabalFile = "cabal"
|
let cabalFile = "cabal"
|
||||||
liftIO $ createDirRecursive' inst
|
liftIO $ createDirRecursive' inst
|
||||||
@ -574,9 +574,9 @@ installHLSBindist dlinfo ver isoFilepath = do
|
|||||||
if isIsolatedInstall
|
if isIsolatedInstall
|
||||||
then do
|
then do
|
||||||
lift $ $(logInfo) [i|isolated installing HLS to #{isoDir}|]
|
lift $ $(logInfo) [i|isolated installing HLS to #{isoDir}|]
|
||||||
liftE $ installHLS' workdir isoDir ver
|
liftE $ installHLSUnpacked workdir isoDir ver
|
||||||
else do
|
else do
|
||||||
liftE $ installHLS' workdir binDir ver
|
liftE $ installHLSUnpacked workdir binDir ver
|
||||||
|
|
||||||
-- create symlink if this is the latest version in a regular install
|
-- create symlink if this is the latest version in a regular install
|
||||||
whenM (pure $ not isIsolatedInstall) $ do
|
whenM (pure $ not isIsolatedInstall) $ do
|
||||||
@ -585,12 +585,12 @@ installHLSBindist dlinfo ver isoFilepath = do
|
|||||||
when (maybe True (ver >=) lInstHLS) $ liftE $ setHLS ver
|
when (maybe True (ver >=) lInstHLS) $ liftE $ setHLS ver
|
||||||
|
|
||||||
-- | Install an unpacked hls distribution.
|
-- | Install an unpacked hls distribution.
|
||||||
installHLS' :: (MonadFail m, MonadLogger m, MonadCatch m, MonadIO m)
|
installHLSUnpacked :: (MonadFail m, MonadLogger m, MonadCatch m, MonadIO m)
|
||||||
=> FilePath -- ^ Path to the unpacked hls bindist (where the executable resides)
|
=> FilePath -- ^ Path to the unpacked hls bindist (where the executable resides)
|
||||||
-> FilePath -- ^ Path to install to
|
-> FilePath -- ^ Path to install to
|
||||||
-> Version
|
-> Version
|
||||||
-> Excepts '[CopyError] m ()
|
-> Excepts '[CopyError] m ()
|
||||||
installHLS' path inst ver = do
|
installHLSUnpacked path inst ver = do
|
||||||
lift $ $(logInfo) "Installing HLS"
|
lift $ $(logInfo) "Installing HLS"
|
||||||
liftIO $ createDirRecursive' inst
|
liftIO $ createDirRecursive' inst
|
||||||
|
|
||||||
@ -752,9 +752,9 @@ installStackBindist dlinfo ver isoFilepath = do
|
|||||||
if isIsolatedInstall
|
if isIsolatedInstall
|
||||||
then do
|
then do
|
||||||
lift $ $(logInfo) [i|isolated installing Stack to #{isoDir}|]
|
lift $ $(logInfo) [i|isolated installing Stack to #{isoDir}|]
|
||||||
liftE $ installStack' workdir isoDir ver
|
liftE $ installStackUnpacked workdir isoDir ver
|
||||||
else do
|
else do
|
||||||
liftE $ installStack' workdir binDir ver
|
liftE $ installStackUnpacked workdir binDir ver
|
||||||
|
|
||||||
-- create symlink if this is the latest version and a regular install
|
-- create symlink if this is the latest version and a regular install
|
||||||
whenM (pure $ not isIsolatedInstall) $ do
|
whenM (pure $ not isIsolatedInstall) $ do
|
||||||
@ -764,12 +764,12 @@ installStackBindist dlinfo ver isoFilepath = do
|
|||||||
|
|
||||||
|
|
||||||
-- | Install an unpacked stack distribution.
|
-- | Install an unpacked stack distribution.
|
||||||
installStack' :: (MonadLogger m, MonadCatch m, MonadIO m)
|
installStackUnpacked :: (MonadLogger m, MonadCatch m, MonadIO m)
|
||||||
=> FilePath -- ^ Path to the unpacked stack bindist (where the executable resides)
|
=> FilePath -- ^ Path to the unpacked stack bindist (where the executable resides)
|
||||||
-> FilePath -- ^ Path to install to
|
-> FilePath -- ^ Path to install to
|
||||||
-> Version
|
-> Version
|
||||||
-> Excepts '[CopyError] m ()
|
-> Excepts '[CopyError] m ()
|
||||||
installStack' path inst ver = do
|
installStackUnpacked path inst ver = do
|
||||||
lift $ $(logInfo) "Installing stack"
|
lift $ $(logInfo) "Installing stack"
|
||||||
let stackFile = "stack"
|
let stackFile = "stack"
|
||||||
liftIO $ createDirRecursive' inst
|
liftIO $ createDirRecursive' inst
|
||||||
|
Loading…
Reference in New Issue
Block a user