dev: cleanups
This commit is contained in:
parent
f1ded22c97
commit
2d90550e25
@ -420,7 +420,7 @@ partitionAndCheckConversionPostings check conversionaccts =
|
|||||||
-- Left fold processes postings in parse order, so that eg inferred costs
|
-- 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.
|
-- will be added to the first (top-most) posting, not the last one.
|
||||||
foldlM select (([], ([], [])), Nothing)
|
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)
|
<&> fmap (second (second reverse) . fst)
|
||||||
where
|
where
|
||||||
select ((cs, others@(ps, os)), Nothing) np@(_, p)
|
select ((cs, others@(ps, os)), Nothing) np@(_, p)
|
||||||
|
|||||||
@ -167,8 +167,8 @@ regexMatch = matchTest
|
|||||||
|
|
||||||
-- | Tests whether a Regexp matches a Text.
|
-- | Tests whether a Regexp matches a Text.
|
||||||
--
|
--
|
||||||
-- This currently unpacks the Text to a String an works on that. This is due to
|
-- This currently unpacks the Text to a String, to work around a performance bug
|
||||||
-- a performance bug in regex-tdfa (#9), which may or may not be relevant here.
|
-- in regex-tdfa (#9), which may or may not be relevant here.
|
||||||
regexMatchText :: Regexp -> Text -> Bool
|
regexMatchText :: Regexp -> Text -> Bool
|
||||||
regexMatchText r = matchTest r . T.unpack
|
regexMatchText r = matchTest r . T.unpack
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user