Fix LiberateCase
authorsimonpj@microsoft.com <unknown>
Mon, 29 Oct 2007 17:06:20 +0000 (17:06 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 29 Oct 2007 17:06:20 +0000 (17:06 +0000)
commitebd091d5cd703b249838baaa125e6c0fa0fe0e45
tree663bd78b3313ccaecd05121f87c12d0964a7e7fb
parentb279a3fc517ee355844223758ef026e108535e57
Fix LiberateCase

Merge to STABLE please

Liberate case was being far too gung-ho about what to specialise. This
bug only showed up when a recursive function 'f' has a nested recursive
function 'g', where 'g' calls 'f' (as well as recursively calling 'g').
This exact situation happens in GHC/IO.writeLines.

This patch puts things right; see Note [When to specialise].  Result:
much less code bloat.
compiler/simplCore/LiberateCase.lhs