From 91d785aee80292cb6329a12ac519b4ea0563b818 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 1 Sep 2025 20:06:35 +0100 Subject: [PATCH] dev:fix: use compatible code rather than new T.show added yesterday --- hledger-lib/Hledger/Data/Timeclock.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hledger-lib/Hledger/Data/Timeclock.hs b/hledger-lib/Hledger/Data/Timeclock.hs index 281fe29d6..be99dcabe 100644 --- a/hledger-lib/Hledger/Data/Timeclock.hs +++ b/hledger-lib/Hledger/Data/Timeclock.hs @@ -157,7 +157,7 @@ timeclockToTransactions now entries0 = transactions <> map (flip makeTimeClockErrorExcerpt "") activesinthisacct <> [ "Overlapping sessions with the same account name are not supported." ] -- XXX better to show full session(s) - -- <> map T.show (filter ((`elem` activesinthisacct).in') sessions) + -- <> map (T.pack . show) (filter ((`elem` activesinthisacct).in') sessions) -- | Find the relevant clockin in the actives list that should be paired with this clockout. -- If there is a session that has the same account name, then use that. @@ -197,11 +197,11 @@ errorExpectedCodeButGot expected actual = error' $ printf makeTimeClockErrorExcerpt :: TimeclockEntry -> T.Text -> T.Text makeTimeClockErrorExcerpt e@TimeclockEntry{tlsourcepos=pos} msg = T.unlines [ T.pack (sourcePosPretty pos) <> ":" - ,l <> " | " <> T.show e + ,l <> " | " <> T.pack (show e) -- ,T.replicate (T.length l) " " <> " |" -- <> T.replicate c " " <> "^") ] <> msg where - l = T.show $ unPos $ sourceLine $ tlsourcepos e + l = T.pack $ show $ unPos $ sourceLine $ tlsourcepos e -- c = unPos $ sourceColumn $ tlsourcepos e -- | Convert a timeclock clockin and clockout entry to an equivalent journal