Commit c4b2ac37 authored by Committed by email@example.comBrowse files
Fix TcUnify.matchExpectedTyConApp so that it returns types of compatible kinds
This fixes Trac #7368. The problem was that we were matching Bad w ~ f (Bad f) where (f :: * -> *). Thta leads to (w ~ Bad f), which is ill-kinded, but matchExpectedTyConApp was returning the (Bad f) as the argument type, and that was being used to instanatiate w in the data constructor type, which is very bad. The code also becomes simpler and easier to understand, which is an excellent thing.
Showing with 38 additions and 39 deletions