Simplify the IdInfo before any RHSs
authorsimonpj@microsoft.com <unknown>
Tue, 28 Feb 2006 13:31:57 +0000 (13:31 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 28 Feb 2006 13:31:57 +0000 (13:31 +0000)
commit2317c27bc0ca18dec43eacf87a6cf22cdf01f0f7
tree92d8c3562e2db9f0d3ce4e84f42adeb5f9a3b8b2
parentbadd5d76687dc28c063cdd539ca89c9fa44a0e9e
Simplify the IdInfo before any RHSs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Simplfy (i.e. substitute) the IdInfo of a recursive group of Ids
before looking at the RHSs of *any* of them.  That way, the rules
are available throughout the letrec, which means we don't have to
be careful about function to put first.

Before, we just simplified the IdInfo of f before looking at f's RHS,
but that's not so good when f and g both have RULES, and both rules
mention the other.

This change makes things simpler, but shouldn't change performance.
ghc/compiler/coreSyn/CoreSubst.lhs
ghc/compiler/simplCore/OccurAnal.lhs
ghc/compiler/simplCore/SimplEnv.lhs
ghc/compiler/simplCore/Simplify.lhs