-
Simon Peyton Jones authored
-------------------------------------- Another attempt to make unbound type variables in RULES work right -------------------------------------- Sigh. I'm trying to find the unbound type variables on the LHS of a RULE. I thought I could just gather free vars, but that does not work well on an un-zonked LHS, because a big lambda might bind a type variable that looks different (pre-zonking) but isn't really. Oh well, back to plan B which is more work but more robust. Now the zonking phase (in TcHsSyn) arranges to zonk types in a different way (zonkTypeCollecting) on a rule LHS than in ordinary expressions (zonkTypeZapping). This is less dependent on the exact form of the LHS (good) but involves another mutable variable (not unclean, but it's sad to have to admit that mutable variables do sometimes allow you to make non-invasive changes).
451a42dc