From 5842e730152a2ae11fc8772a505baa3ba81b1e9c Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 8 Dec 2023 03:04:43 +0100 Subject: chore: drop `Git.withWorkingTree` --- app/Cache.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/Cache.hs') diff --git a/app/Cache.hs b/app/Cache.hs index 52d18ca..7af9ee7 100644 --- a/app/Cache.hs +++ b/app/Cache.hs @@ -6,7 +6,6 @@ where import Data.Binary (Binary, decodeFileOrFail, encodeFile) import Data.Text qualified as T -import Debug import Git qualified import System.Directory (createDirectoryIfMissing, doesFileExist) import System.FilePath (()) @@ -19,13 +18,13 @@ cached key func = do doesFileExist file >>= \case True -> decodeFileOrFail file >>= \case - Left e -> debug "e" e `seq` generate file + Left _ -> generate file Right blob -> pure blob False -> generate file where generate file = do blob <- func - encodeFile (debug "cache miss" file) blob + encodeFile file blob pure blob cachedMaybe :: Binary a => Maybe T.Text -> IO a -> IO a -- cgit v1.2.3