Currently, sealed trait differ are really intertwined with magnolia.
This needs to change if we want to support Differs for:
- "disjoint unions"-like types where we don't have access to the underlying subclasses (e.g. circe
Json type)
- Scala 3 union types
Idea:
In generalized disjoint union differ, we perform a test for each possible member of the union (this is akin to pattern matching on subclasses of a sealed trait), and if the test is successful, we will execute the diff function for that subclass.