[project @ 2001-10-01 09:45:38 by simonpj]
authorsimonpj <unknown>
Mon, 1 Oct 2001 09:45:38 +0000 (09:45 +0000)
committersimonpj <unknown>
Mon, 1 Oct 2001 09:45:38 +0000 (09:45 +0000)
commit5d89d8eb1712aba2226af68d10b04354cd939cc5
treeccc868247fc03480e41eb62dfcf9453054dd5bca
parentf49ddc1dd3a1812e394c91195fe18920cb35211e
[project @ 2001-10-01 09:45:38 by simonpj]
---------------------------
Match rules before inlining
---------------------------

This commit fulfils a long-standing wish by Manuel that RULES
matching occurs before inlining.  So if a RULE matches, it'll
get used, even if the function can also be inlined.

It's a bit dodgy to actually rely on this, because maybe the rule
doesn't match *yet* but will do after a bit more transformation.
But it does help with things like class operations.  Class ops are
simply selectors which pick a method out of a dictionary, so they
are inlined rather vigorously.  But we might want a RULE for a
class method (e.g. (==) [Char] = eqString), and such rules would
practically never fire if inlining took priority.
ghc/compiler/simplCore/SimplUtils.lhs
ghc/compiler/simplCore/Simplify.lhs