Skip to content
  • Simon Peyton Jones's avatar
    Allow TyVars in TcTypes · 18d0bdd3
    Simon Peyton Jones authored
    Up to now we've had a rule that a TyVar can't apppear in a type
    seen by the type checker; they should all be TcTyVars.  But:
    
    a) With -XTypeInType it becomes much harder to exclude them;
       see Note [TcTyVars in the typechecker] in TcType.
    
    b) It's unnecessary to exculde them; instead we can just treat
       a TyVar just like vanillaSkolemTv.
    
    This is what was causing an ASSERT error in
    indexed-types/should_fail/T12041, reported in Trac #12826.
    
    That patch allows a TyVar in a TcType.  The most significant
    change is to make Var.tcTyVarDetails return vanillaSkolemTv.
    In fact it already did, but (a) it was not documented, and
    (b) we never exploited it.  Now we rely on it.
    18d0bdd3