diff --git a/src/PDF/Layer.hs b/src/PDF/Layer.hs index 97e0f0b..0e6a696 100644 --- a/src/PDF/Layer.hs +++ b/src/PDF/Layer.hs @@ -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 =