Fix a bug in rule matching
authorsimonpj@microsoft.com <unknown>
Thu, 4 May 2006 11:24:30 +0000 (11:24 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 4 May 2006 11:24:30 +0000 (11:24 +0000)
commitc276b9b6d9b6f57cb99c0509d8a5a246d675e2b2
tree4560efad5a20092b92301f71c8f9f9752c5fce38
parent64f00b23e172aae40609b5deca87f83aa6f5447a
Fix a bug in rule matching

The rule matcher uses a "rough-match" pre-filter, which was being too
aggressive.  The case looked like this:

rule: f True
expr: case e of x { True -> f x }

Jues because x doesn't immediately look like True, we shouldn't say
"can't match", but that is exactly what ruleCantMatch was doing.
compiler/specialise/Rules.lhs