mirror of
https://github.com/github/semantic.git
synced 2024-12-19 21:01:35 +03:00
Return replacements for all other cases against
This commit is contained in:
parent
1efd68d122
commit
4c3288b6b1
@ -81,7 +81,7 @@ run construct comparable cost algorithm = case runFree algorithm of
|
||||
recur (Case a' as') (Case b' bs') = annotate $ Case (diffTerms' a' b') (diffTerms' as' bs')
|
||||
recur (Object as') (Object bs') = annotate $ Object (zipWith (\a b -> runJoin $ diffTerms' <$> Join a <*> Join b) as' bs')
|
||||
recur (Leaf _) (Leaf _) = pure $ Replace (cofree (annotation1 :< a)) (cofree (annotation2 :< b))
|
||||
recur _ _ = error $ "Unimplemented Interpreter.run term comparison between a: " <> show a <> "\nb: " <> show b
|
||||
recur _ _ = pure $ Replace (cofree (annotation1 :< a)) (cofree (annotation2 :< b))
|
||||
|
||||
diffThese = these (pure . Delete) (pure . Insert) (diffTerms construct comparable cost)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user