1
1
mirror of https://github.com/github/semantic.git synced 2024-12-11 08:45:48 +03:00

Terminate on the first result.

This commit is contained in:
Rob Rix 2018-10-29 11:58:33 -04:00
parent 4abfd4197b
commit d477db7813

View File

@ -20,7 +20,7 @@ diffTerms :: (Diffable syntax, Eq1 syntax, Hashable1 syntax, Traversable syntax)
=> Term syntax ann
-> Term syntax ann
-> Diff.Diff syntax ann ann
diffTerms t1 t2 = stripDiff (fromMaybe (Diff.replacing t1' t2') (run (runNonDet (runDiff (algorithmForTerms t1' t2')))))
diffTerms t1 t2 = stripDiff (fromMaybe (Diff.replacing t1' t2') (run (runNonDetOnce (runDiff (algorithmForTerms t1' t2')))))
where (t1', t2') = ( defaultFeatureVectorDecorator t1
, defaultFeatureVectorDecorator t2)