-
Simon Peyton Jones authored
To print HsTypes correctly we should remember whether the Kind on a HsTyVarBndr came from type inference, or was put there by the user. See Note [Printing KindedTyVars] in HsTypes. So instead of changing a UserTyVar to a KindedTyVar during kind checking, we simply add a PostTcKind to the UserTyVar. The change was provoked by Trac #3830, although other changes mean that #3830 gets a diferent and better error message now. So this patch is simply doing the Right Thing for the future. This patch also fixes Trac #3845, which was caused by a *type splice* not remembering the free *term variables* mentioned in it. Result was that we build a 'let' when it should have been 'letrec'. Hence a new FreeVars field in HsSpliceTy. While I was at it, I got rid of HsSpliceTyOut and use a PostTcKind on HsSpliceTy instead, just like on the UserTyVar.
836b1e90