mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Short-circuit the single incomparable elements case.
This commit is contained in:
parent
f3c02a0efa
commit
833d753a8c
@ -59,7 +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 _ canCompare [a] [b] = if canCompareTerms canCompare a b then [These a b] else [That b, This a]
|
||||
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