[project @ 2003-04-10 14:44:18 by simonpj]
authorsimonpj <unknown>
Thu, 10 Apr 2003 14:44:18 +0000 (14:44 +0000)
committersimonpj <unknown>
Thu, 10 Apr 2003 14:44:18 +0000 (14:44 +0000)
commitde0864de66d27f8d7523fac11ecfae0347b739f3
treee8cce20db779caa1a6752534d47f9172b182fbea
parent322815e79d6b06b376cb6b066c2c600dcf6f4564
[project @ 2003-04-10 14:44:18 by simonpj]
----------------------------------
       Fix a long-standing eta-reduction bug
----------------------------------

Consider the stupid definition

f = \x -> f x

We were erroneously eta-reducing this to

f = f

(unsound because they'd be distinguishable by `seq`)

The reason was that simplLazyBind was exposing the arity of
a recursive function to its own RHS, when all it was really
trying to do was expose the *rules* for the function.

Easily fixed.   This fixes some

"Bad eta expand"

warnings.  Good all round.  In particular, fixes rn006.
ghc/compiler/coreSyn/Subst.lhs
ghc/compiler/simplCore/Simplify.lhs