From 781cf8eed543a66aea271b39bbe112bd436ede2d Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Sun, 25 Jul 2021 21:25:27 +0530 Subject: [PATCH] Delete installCabalBinIsolated function. --- lib/GHCup.hs | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/lib/GHCup.hs b/lib/GHCup.hs index 3820eaf..479f395 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -476,58 +476,6 @@ installCabal' path inst ver = do destPath lift $ chmod_755 destPath --- | Installs GHC to a specified location, doesn't make any symlinks. -installCabalBinIsolated :: ( MonadMask m - , MonadCatch m - , MonadReader env m - , HasPlatformReq env - , HasGHCupInfo env - , HasDirs env - , HasSettings env - , MonadLogger m - , MonadResource m - , MonadIO m - , MonadUnliftIO m - , MonadFail m - ) - => FilePath - -> Version - -> Excepts - '[ AlreadyInstalled - , CopyError - , DigestError - , DownloadFailed - , NoDownload - , NotInstalled - , UnknownArchive - , TarDirDoesNotExist -#if !defined(TAR) - , ArchiveResult -#endif - ] - m - () -installCabalBinIsolated isoDir ver = do - dlinfo <- liftE $ getDownloadInfo Cabal ver - lift $ $(logDebug) [i|Requested to install cabal version #{ver}|] - - -- download (or use cached version) - dl <- liftE $ downloadCached dlinfo Nothing - - PlatformRequest {_rPlatform} <- lift getPlatformReq - - -- unpack - tmpUnpack <- lift withGHCupTmpDir - liftE $ unpackToDir tmpUnpack dl - void $ lift $ darwinNotarization _rPlatform tmpUnpack - - -- the subdir of the archive where we do the work - workdir <- maybe (pure tmpUnpack) (liftE . intoSubdir tmpUnpack) (view dlSubdir dlinfo) - - lift $ $(logInfo) [i|isolated installing Cabal to #{isoDir}|] - liftE $ installCabal' workdir isoDir ver - - -- | Installs cabal into @~\/.ghcup\/bin/cabal-\@ and -- creates a default @cabal -> cabal-x.y.z.q@ symlink for -- the latest installed version.