Make record selection look cheap
authorsimonpj@microsoft.com <unknown>
Wed, 6 Sep 2006 11:52:42 +0000 (11:52 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 6 Sep 2006 11:52:42 +0000 (11:52 +0000)
commit061d33c9923500d169570171947335053b63755f
tree4391f19349aa0af4c52a688388ef56ddbc29b8ee
parentc949e1a9af96cd5241d8cfc74fe3c622258edd7e
Make record selection look cheap

exprIsCheap was already making record selection look cheap, esp for
dictionary selection; e.g.
   (==) dEq

The idea is to allow those record selections to migrate inside a
lambda, because on the whole it's more expensive to share than
repeat them.

But sometimes dictionary selection is nested; e.g.
   (==) ($p1Num dNum)

This turned out to make a (fragile) rewrite rule fire a little
more robustly, but it seems like a good idea in any case.

This patch makes nested record selections also look cheap.
compiler/coreSyn/CoreUtils.lhs