
18 Jul
2017
18 Jul
'17
11:52 p.m.
On Tuesday, July 18, 2017 3:55:28 PM EDT Conal Elliott wrote:
Hi Sebastian,
Thanks for the reply. It's that I don't want `exampleC` to be eta-expanded. Apparently GHC does by default even when doing so moves computation under lambda. I've thought otherwise for a very long time.
GHC really likes to eta-expand, because that can be very good for allocation, unboxing, and I don't know what else. Do you really need to represent the intermediate result by a *function*? Would it work just to save the Double itself? I suspect you could likely convince GHC to leave it alone. David