-
Simon Peyton Jones authored
Do a better job of eta expansion. This showed up in one of Manuel's programs, where he got code like: $wsimpleGen ww (\ i :: Int -> case i of wild1 { I# i# -> case w of wild2 { I# e# -> __coerce (ST RealWorld ()) (\ s# :: (State# RealWorld) -> case writeIntArray# @ RealWorld mba# i# e# s# of s2#1 { __DEFAULT -> (# s2#1, () #) }) } }) s2# The argument wasn't eta expanded, so it got right through to the code generator as two separte lambdas. Needless to say, I fiddled around with things in a vain attempt to tidy them up. Yell if anything seems to go wrong, or perfomance drops on any programs.
0b62f53e