Factor out installHLS'

This commit is contained in:
Arjun Kathuria 2021-07-23 16:23:03 +05:30
parent 476513b0a7
commit c0f46ef81f
1 changed files with 27 additions and 28 deletions

View File

@ -634,13 +634,13 @@ installHLSBindist dlinfo ver = do
let lInstHLS = headMay . reverse . sort $ hlsVers
when (maybe True (ver >=) lInstHLS) $ liftE $ setHLS ver
where
-- | Install an unpacked hls distribution.
installHLS' :: (MonadFail m, MonadLogger m, MonadCatch m, MonadIO m)
=> FilePath -- ^ Path to the unpacked hls bindist (where the executable resides)
-> FilePath -- ^ Path to install to
-> Version
-> Excepts '[CopyError] m ()
installHLS' path inst = do
installHLS' path inst ver = do
lift $ $(logInfo) "Installing HLS"
liftIO $ createDirRecursive' inst
@ -667,7 +667,6 @@ installHLSBindist dlinfo ver = do
(inst </> toF)
lift $ chmod_755 (inst </> toF)
-- | Installs hls binaries @haskell-language-server-\<ghcver\>@
-- into @~\/.ghcup\/bin/@, as well as @haskell-languager-server-wrapper@.
installHLSBin :: ( MonadMask m