generic-diff provides a typeclass-based way to structurally compare values of the same type. See generic-diff for the core package, or generic-diff-instances for a more "batteries-included" set of instances.