Lens is a function that perform immutable record modification: it copies the record modifying part of its content. Lenses is a library that allows you to combine lenses to attain more complicated modifications.
I'm searching for correct term that defines reverse abstraction. Some function that compares two objects and return difference between them. Such functions also produce a system. Each modification could be represented simultaneously with fine-grained description "field A inside field B inside field C inside the record" or with coarse "field C inside the record". So you can pattern match modification with desired grade of accuracy.
I need to write code for comparing records and reacting to modifications inside them. I would like to avoid reinventing the wheel. I tried to google reverse lenses but drowned in non-relevant output.