Skip to content
  • Simon Peyton Jones's avatar
    Fix TcUnify.matchExpectedTyConApp so that it returns types of compatible kinds · c4b2ac37
    Simon Peyton Jones authored
    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.
    c4b2ac37