Skip to content
  • Simon Peyton Jones's avatar
    Exclude TyVars from the constraint solver · 7496be5c
    Simon Peyton Jones authored
    There is a general invariant that the constraint solver doesn't see
    TyVars, only TcTyVars.  But when checking the generic-default
    signature of a class, we called checkValidType on the generic-default
    type, which had the class TyVar free. That in turn meant that it wasn't
    considered during flattening, which led to the error reported in
    Trac #11608.
    
    The fix is simple: call checkValidType on the /closed/ type. Easy.
    
    While I was at it, I added a bunch of ASSERTs about the TcTyVar
    invariant.
    7496be5c