Make eta reduction check more carefully for bottoms (fix Trac #1947)
authorsimonpj@microsoft.com <unknown>
Tue, 4 Dec 2007 14:58:03 +0000 (14:58 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 4 Dec 2007 14:58:03 +0000 (14:58 +0000)
commit87e82c15b1ab2eb3dd37c681f6615ec47b476f9f
tree1d76987e735d6c357edbda4ed4297acf6d0d9e0e
parent30c39066cfbbb9380fff1f3266405d37af798009
Make eta reduction check more carefully for bottoms (fix Trac #1947)

Eta reduction was wrongly transforming
f = \x. f x
to
f = f

Solution: don't trust f's arity information; instead look at its
unfolding.  See Note [Eta reduction conditions]

Almost all the new lines are comments!
compiler/simplCore/SimplUtils.lhs