From d60f58cf431602a4d206b484318d76f5f125d209 Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Tue, 7 Sep 2021 14:22:21 +0530 Subject: [PATCH] simplify `checkIfToolInstalled` for Cabal --- lib/GHCup.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/GHCup.hs b/lib/GHCup.hs index fa58f29..89fa26b 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -476,12 +476,7 @@ checkIfToolInstalled tool ver = do Dirs { binDir } <- getDirs case tool of - Cabal -> do - v <- cabalInstalled ver - liftIO $ handleIO (\_ -> pure False) - $ fmap (\x -> v && x) - $ pathIsLink (binDir "cabal" <> exeExt) - + Cabal -> cabalInstalled ver _ -> pure False -- | Install an unpacked cabal distribution.Symbol