Fix Trac #1746: make rule-matching work properly with Cast expressions
authorsimonpj@microsoft.com <unknown>
Sat, 29 Sep 2007 10:44:06 +0000 (10:44 +0000)
committersimonpj@microsoft.com <unknown>
Sat, 29 Sep 2007 10:44:06 +0000 (10:44 +0000)
commit27ebdb91ed6df61dbf680a87ccda40337bc811af
treeadc638f235cacc64503f614a1ed0c1f8f288636a
parent8fd85c9d692f91a5b565bb0d54050c2ce6ac6ae2
Fix Trac #1746: make rule-matching work properly with Cast expressions

The Cast case of the rule-matcher was simply wrong.

This patch fixes it; see Trac #1746.

I also fixed the rule generation in SpecConstr to generate a wild-card
for the cast expression, which we don't want to match on.  This makes
the rule more widely applicable; it wasn't the cause of the bug.
compiler/specialise/Rules.lhs
compiler/specialise/SpecConstr.lhs
compiler/types/Unify.lhs