Preserve join-point arity in CoreOpt
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 1 May 2018 11:16:28 +0000 (12:16 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 1 May 2018 12:18:40 +0000 (13:18 +0100)
commitd4cc74f1a5d1aafc8a2fde3c80019e2ef88d146b
tree4deb03b4b415b41c16d798b9dd836ccb946fa7bd
parent07cc6039dccff82790bf1d84a81e26df234ad899
Preserve join-point arity in CoreOpt

Trac #15108 showed that the simple optimiser in CoreOpt
was accidentally eta-reducing a join point, so it didn't meet
its arity invariant.

This patch fixes it.  See Note [Preserve join-binding arity].
compiler/coreSyn/CoreOpt.hs
testsuite/tests/profiling/should_compile/all.T