[project @ 2002-09-17 13:00:14 by simonpj]
authorsimonpj <unknown>
Tue, 17 Sep 2002 13:00:15 +0000 (13:00 +0000)
committersimonpj <unknown>
Tue, 17 Sep 2002 13:00:15 +0000 (13:00 +0000)
commit451a42dc47f88ce86a1a914f0f7e28290e1b1648
treeacf43ffb1f7f12e78215262f8ee2437ad5584fb4
parent4a486aef4c0834a641a97b483f12fd2290fde225
[project @ 2002-09-17 13:00:14 by simonpj]
--------------------------------------
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).
ghc/compiler/typecheck/TcHsSyn.lhs
ghc/compiler/typecheck/TcMType.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRules.lhs