diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-12-08 03:04:43 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-12-08 03:04:43 +0100 |
commit | 5842e730152a2ae11fc8772a505baa3ba81b1e9c (patch) | |
tree | b1c51d7371a173e646d6ac1bb0f9a15e96e34c58 /app/Cache.hs | |
parent | c1ff403387064ff0027b9e762cc6f6a8fa20c8d9 (diff) |
chore: drop `Git.withWorkingTree`
Diffstat (limited to 'app/Cache.hs')
-rw-r--r-- | app/Cache.hs | 5 |
1 files changed, 2 insertions, 3 deletions
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 |