From 2d90550e259e7b33dc995681953c9e2389dc19f5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 17 Oct 2024 10:53:27 -1000 Subject: [PATCH] dev: cleanups --- hledger-lib/Hledger/Data/Transaction.hs | 2 +- hledger-lib/Hledger/Utils/Regex.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hledger-lib/Hledger/Data/Transaction.hs b/hledger-lib/Hledger/Data/Transaction.hs index 8246afefb..79c16cae7 100644 --- a/hledger-lib/Hledger/Data/Transaction.hs +++ b/hledger-lib/Hledger/Data/Transaction.hs @@ -420,7 +420,7 @@ partitionAndCheckConversionPostings check conversionaccts = -- Left fold processes postings in parse order, so that eg inferred costs -- will be added to the first (top-most) posting, not the last one. foldlM select (([], ([], [])), Nothing) - -- The costless other postings are somehow reversed still; "second (second reverse" fixes that. + -- The costless other postings are somehow reversed still; "second (second reverse)" fixes that. <&> fmap (second (second reverse) . fst) where select ((cs, others@(ps, os)), Nothing) np@(_, p) diff --git a/hledger-lib/Hledger/Utils/Regex.hs b/hledger-lib/Hledger/Utils/Regex.hs index 5d99b383b..052b1e5c6 100644 --- a/hledger-lib/Hledger/Utils/Regex.hs +++ b/hledger-lib/Hledger/Utils/Regex.hs @@ -167,8 +167,8 @@ regexMatch = matchTest -- | Tests whether a Regexp matches a Text. -- --- This currently unpacks the Text to a String an works on that. This is due to --- a performance bug in regex-tdfa (#9), which may or may not be relevant here. +-- This currently unpacks the Text to a String, to work around a performance bug +-- in regex-tdfa (#9), which may or may not be relevant here. regexMatchText :: Regexp -> Text -> Bool regexMatchText r = matchTest r . T.unpack