Draft: Unify special typeclass constraints under a datatype (#20441)
This is an implementation of the idea outlined in #20441.
I have more or less copied the datatype definition from the issue and added the missing few constructors. I have also replaced the ad-hoc comparisons in check_special_inst_head
and matchGlobalInst
as described. Based on a few greps I did through the codebase, there shouldn't be anywhere else where this could be used, but I can't say so for certain as I am pretty new with the GHC codebase.