1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Inserted elements are inserted.

This commit is contained in:
Rob Rix 2015-12-15 12:42:50 -05:00
parent 095ed7307f
commit 0908a4efd8

View File

@ -55,7 +55,7 @@ run comparable (Free (Recursive (annotation1 :< a) (annotation2 :< b) f)) = run
run comparable (Free (ByKey a b f)) = run comparable $ f byKey where
byKey = Map.fromList $ toKeyValue <$> List.union aKeys bKeys
toKeyValue key | List.elem key deleted = (key, Pure . Delete $ a ! key)
toKeyValue key | List.elem key inserted = (key, Pure . Delete $ b ! key)
toKeyValue key | List.elem key inserted = (key, Pure . Insert $ b ! key)
toKeyValue key = (key, interpret comparable (a ! key) (b ! key))
aKeys = Map.keys a
bKeys = Map.keys b