Functions with no binding are being eta-reduced in tryEtaReduce
The function GHC.Core.CoreToStg.Prep.tryEtaReducePrep
contains additional logic to avoid eta-reducing functions with no binding. This logic is missing from GHC.Core.Utils.tryEtaReduce
. Usually this doesn't cause problems because we will eta-expand again in Core Prep before running into trouble, but it was possible to run into a situation in which keepAlive#
was eta-reduced and never eta-expanded again, because of the special logic dedicated to it in Core Prep.