@@ -45,12 +45,12 @@ storeEncodeFile :: (Store a, MonadIO m, MonadLogger m, Eq a)
4545 -> m ()
4646storeEncodeFile pokeFunc peekFunc fp x = do
4747 let fpt = T. pack (toFilePath fp)
48- $ logDebug $ " Encoding " <> fpt
48+ logDebug $ " Encoding " <> fpt
4949 ensureDir (parent fp)
5050 let (sz, poker) = pokeFunc x
5151 encoded = unsafeEncodeWith poker sz
5252 assert (decodeExWith peekFunc encoded == x) $ liftIO $ BS. writeFile (toFilePath fp) encoded
53- $ logDebug $ " Finished writing " <> fpt
53+ logDebug $ " Finished writing " <> fpt
5454
5555-- | Read from the given file. If the read fails, run the given action and
5656-- write that back to the file. Always starts the file off with the
@@ -63,14 +63,14 @@ versionedDecodeOrLoadImpl :: (Store a, Eq a, MonadUnliftIO m, MonadLogger m)
6363 -> m a
6464versionedDecodeOrLoadImpl pokeFunc peekFunc fp mx = do
6565 let fpt = T. pack (toFilePath fp)
66- $ logDebug $ " Trying to decode " <> fpt
66+ logDebug $ " Trying to decode " <> fpt
6767 mres <- versionedDecodeFileImpl peekFunc fp
6868 case mres of
6969 Just x -> do
70- $ logDebug $ " Success decoding " <> fpt
70+ logDebug $ " Success decoding " <> fpt
7171 return x
7272 _ -> do
73- $ logDebug $ " Failure decoding " <> fpt
73+ logDebug $ " Failure decoding " <> fpt
7474 x <- mx
7575 storeEncodeFile pokeFunc peekFunc fp x
7676 return x
@@ -81,14 +81,14 @@ versionedDecodeFileImpl :: (Store a, MonadUnliftIO m, MonadLogger m)
8181 -> m (Maybe a )
8282versionedDecodeFileImpl peekFunc fp = do
8383 mbs <- liftIO (Just <$> BS. readFile (toFilePath fp)) `catch` \ (err :: IOException ) -> do
84- $ logDebug (" Exception ignored when attempting to load " <> T. pack (toFilePath fp) <> " : " <> T. pack (show err))
84+ logDebug (" Exception ignored when attempting to load " <> T. pack (toFilePath fp) <> " : " <> T. pack (show err))
8585 return Nothing
8686 case mbs of
8787 Nothing -> return Nothing
8888 Just bs ->
8989 liftIO (Just <$> decodeIOWith peekFunc bs) `catch` \ (err :: PeekException ) -> do
9090 let fpt = T. pack (toFilePath fp)
91- $ logDebug (" Error while decoding " <> fpt <> " : " <> T. pack (show err) <> " (this might not be an error, when switching between stack versions)" )
91+ logDebug (" Error while decoding " <> fpt <> " : " <> T. pack (show err) <> " (this might not be an error, when switching between stack versions)" )
9292 return Nothing
9393
9494storeVersionConfig :: String -> String -> VersionConfig a
0 commit comments