mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Short-circuit the single comparable elements case.
This commit is contained in:
parent
5762c4d405
commit
f3c02a0efa
@ -59,6 +59,7 @@ rws :: (HasField fields (Maybe FeatureVector), Functor f, Eq1 f)
|
||||
-> RWSEditScript f fields
|
||||
rws _ _ as [] = This <$> as
|
||||
rws _ _ [] bs = That <$> bs
|
||||
rws _ canCompare [a] [b] | canCompareTerms canCompare a b = [These a b]
|
||||
rws editDistance canCompare as bs = Eff.run . RWS.run editDistance canCompare as bs $ do
|
||||
sesDiffs <- ses'
|
||||
(featureAs, featureBs, mappedDiffs, allDiffs) <- genFeaturizedTermsAndDiffs' sesDiffs
|
||||
|
Loading…
Reference in New Issue
Block a user