[project @ 2001-03-01 15:06:52 by simonpj]
Improve rule matching even more
Manuel discovered that given
{-# RULES "fst over sndSnd" forall v. fst (sndSnd v) = fst v #-}
sndSnd :: (a, (b, c)) -> (a, c)
sndSnd (x, (y, z)) = (x, z)
the rule gets a type, which is too specialised, namely
{-## __R "fst over sndSnd" __forall {@ a1 v :: (a1, ((), ()))}
fst @ a1 @ () (sndSnd @ a1 @ () @ () v) = fst @ a1 @ ((), ()) v ;
This was because TcRules wasn't quantifying over enough type variables.
This commit fixes the problem.
The test is in tests/simplCore/should_run/simplrun002