1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 21:16:12 +03:00

Rename to sesDiffs

This commit is contained in:
joshvera 2016-09-09 12:13:24 -04:00
parent 2fc783893a
commit cce8cb66ec

View File

@ -65,7 +65,7 @@ rws compare as bs
-- 4. Use structure to propagate matchings?
-- 5. Compute the diff
where sesDiff = eitherCutoff 1 <$> SES.ses replaceIfEqual cost as bs
where sesDiffs = eitherCutoff 1 <$> SES.ses replaceIfEqual cost as bs
replaceIfEqual :: HasField fields Category => Cofree f (Record fields) -> Cofree f (Record fields) -> Maybe (Free (CofreeF f (Both (Record fields))) (Patch (Cofree f (Record fields))))
replaceIfEqual a b
| (category <$> a) == (category <$> b) = hylo wrap runCofree <$> zipTerms a b
@ -86,7 +86,7 @@ rws compare as bs
(as, featurize counterB term : bs, counterA, succ counterB, diffs)
syntax -> let diff' = free syntax >>= either identity pure in
(as, bs, succ counterA, succ counterB, (counterA, diff') : diffs)
) ([], [], 0, 0, []) sesDiff
) ([], [], 0, 0, []) sesDiffs
kdas = KdTree.build (Vector.toList . feature) fas
kdbs = KdTree.build (Vector.toList . feature) fbs