Better eta-expansion, and less DFun specialisation
Work in progress on #18223 (closed)
There are two main changes in here
-
Stop Specialise specalising DFuns. This cases a huge (and utterly unnecessary) blowup in program size in #18223 (closed).
I also refactored the Specialise monad a bit... it was silly.
-
Re-engineer eta-expansion (again). The eta-expander was generating lots of intermediate stuff, which could be optimised away, but which choked the simplifier meanwhile. Relatively easy to kill it off at source.