A small renaming for more clarity and because I thought «update» could be needed for a function name but after all maybe not but it's still better that way

This commit is contained in:
Tissevert 2020-02-23 22:17:09 +01:00
parent 36b1782464
commit 160999a7d7

View file

@ -65,13 +65,13 @@ unify = foldl complete emptyLayer
}
unifyDocStructure :: Structure -> Structure -> Structure
unifyDocStructure update original = Structure {
xRef = Map.union (xRef update) (xRef original)
, trailer = Map.union (trailer update) (trailer original)
unifyDocStructure new old = Structure {
xRef = Map.union (xRef new) (xRef old)
, trailer = Map.union (trailer new) (trailer old)
}
unifyOccurrences :: IndexedObjects -> [Occurrence] -> [Occurrence] -> [Occurrence]
unifyOccurrences objects update = foldr addOlder update
unifyOccurrences objects new = foldr addOlder new
where
addOlder occurrence@(Comment _) existing = occurrence : existing
addOlder occurrence@(Indirect indirect) existing =