From 0b7d447aaf0bf4fd0de587ceefba944568bd784c Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 25 Apr 2021 18:00:32 +0200 Subject: [PATCH] Satisfy hlint --- lib/GHCup/Utils/Dirs.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/GHCup/Utils/Dirs.hs b/lib/GHCup/Utils/Dirs.hs index ac34408..f30628b 100644 --- a/lib/GHCup/Utils/Dirs.hs +++ b/lib/GHCup/Utils/Dirs.hs @@ -252,12 +252,12 @@ mkGhcupTmpDir = do toBytes mb = mb * 1024 * 1024 toMB b = show (truncate' (fromIntegral b / (1024 * 1024) :: Double) 2) truncate' :: Double -> Int -> Double - truncate' x n = (fromIntegral (floor (x * t) :: Integer)) / t + truncate' x n = fromIntegral (floor (x * t) :: Integer) / t where t = 10^n withGHCupTmpDir :: (MonadUnliftIO m, MonadLogger m, MonadCatch m, MonadResource m, MonadThrow m, MonadIO m) => m (Path Abs) -withGHCupTmpDir = snd <$> (withRunInIO $ \run -> run $ allocate (run mkGhcupTmpDir) deleteDirRecursive) +withGHCupTmpDir = snd <$> withRunInIO (\run -> run $ allocate (run mkGhcupTmpDir) deleteDirRecursive)