Substitution should just substitute, not optimise
authorsimonpj@microsoft.com <unknown>
Thu, 25 Nov 2010 17:23:56 +0000 (17:23 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 25 Nov 2010 17:23:56 +0000 (17:23 +0000)
commit30c17e7096919c55218083c8fcb98e6287552058
tree7064852738cf1876917948639d5d667d29069cca
parent45a61df30f95b22d4818b6e3e3622707911bde03
Substitution should just substitute, not optimise

This was causing Trac #4524, by optimising
     (e |> co)  to   e
on the LHS of a rule.  Result, the template variable
'co' wasn't bound any more.

Now that substition doesn't optimise, it seems sensible to call
simpleOptExpr rather than substExpr when substituting in the
RHS of rules.  Not a big deal either way.
compiler/coreSyn/CoreSubst.lhs