Fix a bad error in tcMatchTy
Fix a bad error in tcMatchTy
This patch fixes #17395 (closed), a very subtle and hard-to-trigger bug in tcMatchTy. It's all explained in Note [Matching in the presence of casts (2)]
I have not added a regression test because it is very hard to trigger it, until we have the upcoming mkAppTyM patch, after which lacking this patch means you can't even compile the libraries.