support more predicates, like `issetequal`
Currently, the predicate (== or another) is simply propagated and used to compare all parts of the object.
It would be useful to also support stuff like whynot(issetequal, a, b) for collections. It should point to an element in one collection but not the other, and potentially find the "closest" match in the other collection to show differences there (using ==).
Do you think this is feasible to implement?
Feasible yes, probably needs a big refactoring if we want to avoid complexity hell. If you are still interested, happy to discuss ideas.
Roughly we could do something like this. We allow the comparison function to not only return true, false but a reason why something is false. E.g. cmp(x,y)::Union{Bool, AbstractDiagnostic}. For instance AbstractDiagnostic could be a struct that tells two sets are not equal and holds the closest element.
We also add another indirection resolve_cmp that maps issetequal to such a comparison function with a custom diagnostic.