dev: cleanups

This commit is contained in:
Simon Michael 2024-10-17 10:53:27 -10:00
parent f1ded22c97
commit 2d90550e25
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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